diff options
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/dcp_content.cc | 5 | ||||
| -rw-r--r-- | src/lib/exceptions.h | 15 |
2 files changed, 16 insertions, 4 deletions
diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc index 318e3ce52..256112eb2 100644 --- a/src/lib/dcp_content.cc +++ b/src/lib/dcp_content.cc @@ -186,10 +186,7 @@ DCPContent::read_directory (boost::filesystem::path p) if (!have_metadata) { throw DCPError ("No ASSETMAP or ASSETMAP.xml file found: is this a DCP?"); } else { - throw DCPError ( - "This looks like a DCP-o-matic project folder, which cannot be added to a different project. " - "Choose the DCP directory inside the DCP-o-matic project folder if that's what you want to import." - ); + throw ProjectFolderError (); } } diff --git a/src/lib/exceptions.h b/src/lib/exceptions.h index 05cda9659..c64f561a8 100644 --- a/src/lib/exceptions.h +++ b/src/lib/exceptions.h @@ -266,6 +266,21 @@ public: {} }; + +/** @class ProjectFolderError + * @brief An attempt has been made to read a DCP from a directory, but it looks + * like the directory actually contains a DCP-o-matic project. + */ +class ProjectFolderError : public DCPError +{ +public: + /* Code which catches this exception will provide their own message */ + ProjectFolderError () + : DCPError ("dummy") + {} +}; + + class InvalidSignerError : public std::runtime_error { public: |
