41 #include "compose.hpp"
45 using std::runtime_error;
46 using boost::optional;
50 FileError::FileError (
string message, boost::filesystem::path filename,
int number)
51 : runtime_error (String::compose (
"%1 (%2) (error %3)", message, filename.string(), number))
52 , _filename (filename)
59 UnresolvedRefError::UnresolvedRefError (
string id)
60 : runtime_error (String::compose (
"Unresolved reference to asset id %1", id))
66 TimeFormatError::TimeFormatError (
string bad_time)
67 : runtime_error (String::compose (
"Bad time string %1", bad_time))
73 BadContentKindError::BadContentKindError (
string content_kind)
74 :
ReadError (String::compose(
"Bad content kind '%1'", content_kind))
80 NotEncryptedError::NotEncryptedError (
string const & what)
81 : runtime_error (String::compose (
"%1 is not encrypted", what))
87 ProgrammingError::ProgrammingError (
string file,
int line)
88 : runtime_error (String::compose (
"Programming error at %1:%2", file, line))
94 KDMDecryptionError::KDMDecryptionError (std::string message,
int cipher_length,
int modulus_dmax)
95 : runtime_error (String::compose (
"Could not decrypt KDM (%1) (%2/%3)", message, cipher_length, modulus_dmax))
101 KDMFormatError::KDMFormatError (std::string message)
102 : runtime_error (String::compose (
"Could not parse KDM (%1)", message))
108 CertificateChainError::CertificateChainError (
string message)
109 : runtime_error (message)
115 ReadError::ReadError (
string message,
string detail)
116 : runtime_error(String::compose(
"%1 (%2)", message, detail))
124 MissingSubtitleImageError::MissingSubtitleImageError (
string id)
125 : runtime_error (String::compose(
"Could not load image for subtitle %1", id))
131 BadKDMDateError::BadKDMDateError (
bool starts_too_early)
134 "KDM validity period starts before or close to the start of the signing certificate validity period" :
135 "KDM validity ends after or close to the end of the signing certificate's validity period"
137 , _starts_too_early (starts_too_early)
143 StartCompressionError::StartCompressionError (optional<int> code)
144 : runtime_error (String::compose(
"Could not start JPEG2000 encoding%1", code ? String::compose(
" (%1", *code) :
""))
150 CombineError::CombineError (
string message)
151 : runtime_error (message)
155 LanguageTagError::LanguageTagError (std::string message)
156 : runtime_error (message)
160 BadSettingError::BadSettingError (std::string message)
161 : runtime_error (message)
167 DuplicateIdError::DuplicateIdError (std::string message)
168 : runtime_error (message)
174 MainSoundConfigurationError::MainSoundConfigurationError (std::string s)
175 : runtime_error (String::compose(
"Could not parse MainSoundConfiguration %1", s))
181 UnknownChannelIdError::UnknownChannelIdError (std::string
id)
182 : runtime_error (String::compose(
"Unrecognised channel id '%1'", id))
188 NoReelsError::NoReelsError ()
189 : runtime_error (
"Cannot make a DCP when no reels have been added")
195 MissingAssetmapError::MissingAssetmapError (boost::filesystem::path dir)
196 :
ReadError (String::compose(
"Could not find ASSETMAP nor ASSETMAP.xml in '%1'", dir.string()))
Any error that occurs when reading data from a DCP.
Exceptions thrown by libdcp.
Namespace for everything in libdcp.