+ : DCPReadError (
+ type == MAIN_PICTURE ? String::compose ("Missing asset %1 for main picture", path.string()) :
+ (type == MAIN_SOUND ? String::compose ("Missing asset %1 for main sound", path.string()) :
+ (type == MAIN_SUBTITLE ? String::compose ("Missing asset %1 for main subtitle", path.string()) :
+ String::compose ("Missing asset %1", path.string()))))
+{
+
+}
+
+NotEncryptedError::NotEncryptedError (string const & what)
+ : runtime_error (String::compose ("%1 is not encrypted", what))
+{
+
+}
+
+
+ProgrammingError::ProgrammingError (string file, int line)
+ : runtime_error (String::compose ("Programming error at %1:%2", file, line))
+{
+
+}
+
+MismatchedStandardError::MismatchedStandardError ()
+ : DCPReadError ("DCP contains both Interop and SMPTE parts")
+{
+
+}
+
+KDMDecryptionError::KDMDecryptionError (std::string message, int cipher_length, int modulus_dmax)
+ : runtime_error (String::compose ("Could not decrypt KDM (%1) (%2/%3)", message, cipher_length, modulus_dmax))
+{
+
+}
+
+KDMFormatError::KDMFormatError (std::string message)
+ : runtime_error (String::compose ("Could not parse KDM (%1)", message))
+{
+
+}
+
+CertificateChainError::CertificateChainError (std::string message)
+ : runtime_error (message)
+{
+
+}
+
+DCPReadError::DCPReadError (string message, string detail)
+ : runtime_error(String::compose("%1 (%2)", message, detail))
+ , _message(message)
+ , _detail(detail)