diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-04-05 00:12:59 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-04-05 00:12:59 +0100 |
| commit | ad46791780c9e59d001b63a74251ebc1f46cd36c (patch) | |
| tree | 6864aa249ad1af4f119c8b25268062408940a35a /src/lib/writer.cc | |
| parent | 2b404e6ce0c5936704e7e15d537f0e6db2d1d6ca (diff) | |
More detailed error with an invalid signer chain.
Diffstat (limited to 'src/lib/writer.cc')
| -rw-r--r-- | src/lib/writer.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 595915883..6e6bedb8f 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -95,8 +95,9 @@ Writer::Writer (shared_ptr<const Film> film, weak_ptr<Job> j) _subtitle_reel = _reels.begin (); /* Check that the signer is OK if we need one */ - if (_film->is_signed() && !Config::instance()->signer_chain()->valid ()) { - throw InvalidSignerError (); + string reason; + if (_film->is_signed() && !Config::instance()->signer_chain()->valid(&reason)) { + throw InvalidSignerError (reason); } } @@ -510,8 +511,9 @@ Writer::finish () if (_film->is_signed ()) { signer = Config::instance()->signer_chain (); /* We did check earlier, but check again here to be on the safe side */ - if (!signer->valid ()) { - throw InvalidSignerError (); + string reason; + if (!signer->valid (&reason)) { + throw InvalidSignerError (reason); } } |
