summaryrefslogtreecommitdiff
path: root/src/exceptions.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-05-28 23:13:37 +0100
committerCarl Hetherington <cth@carlh.net>2014-05-28 23:13:37 +0100
commitff9a83e4d57c30409162ae1cb94fe471d8f2cf6f (patch)
treeb48eda076d3d1cc20c032af6bf43d39dc0626bf8 /src/exceptions.cc
parentc272879a8e748be83acbb190257d78a34be3f25f (diff)
Throw NotEncryptedError on an attempt to generate KDM for a non-encrypted asset. Tidy exceptions a bit.
Diffstat (limited to 'src/exceptions.cc')
-rw-r--r--src/exceptions.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/exceptions.cc b/src/exceptions.cc
index 951627a5..eb655bfa 100644
--- a/src/exceptions.cc
+++ b/src/exceptions.cc
@@ -23,11 +23,16 @@
using std::string;
using namespace libdcp;
-FileError::FileError (std::string const & message, boost::filesystem::path filename, int number)
- : _message (String::compose ("%1 (%2) (error %3)", message, filename.string(), number))
+FileError::FileError (string const & message, boost::filesystem::path filename, int number)
+ : StringError (String::compose ("%1 (%2) (error %3)", message, filename.string(), number))
, _filename (filename)
, _number (number)
{
}
+NotEncryptedError::NotEncryptedError (string const & what)
+ : StringError (String::compose ("%1 asset is not encrypted", what))
+{
+
+}