Remove old warning.
[libdcp.git] / src / exceptions.h
index fb17801f4fbbb09b760c0b1a867f6cc6058d7066..2871ee86598f7696373ca452ec2ee26e8c5d9c39 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
 
     This file is part of libdcp.
 
@@ -35,6 +35,7 @@
 #define LIBDCP_EXCEPTIONS_H
 
 #include <boost/filesystem.hpp>
+#include <boost/optional.hpp>
 
 /** @file  src/exceptions.h
  *  @brief Exceptions thrown by libdcp.
@@ -97,8 +98,24 @@ class DCPReadError : public std::runtime_error
 {
 public:
        explicit DCPReadError (std::string message)
-               : std::runtime_error (message)
+               : std::runtime_error(message)
        {}
+
+       DCPReadError (std::string message, std::string detail);
+
+       ~DCPReadError() throw () {}
+
+       std::string message () const {
+               return _message;
+       }
+
+       boost::optional<std::string> detail () const {
+               return _detail;
+       }
+
+private:
+       std::string _message;
+       boost::optional<std::string> _detail;
 };
 
 /** @class MissingAssetError
@@ -176,7 +193,7 @@ public:
 class KDMDecryptionError : public std::runtime_error
 {
 public:
-       KDMDecryptionError (std::string message);
+       KDMDecryptionError (std::string message, int cipher_length, int modulus_dmax);
 };
 
 class KDMFormatError : public std::runtime_error