From: Carl Hetherington Date: Wed, 23 Jun 2021 15:17:45 +0000 (+0200) Subject: Add some more DecodeError constructors. X-Git-Tag: v2.15.155~4 X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=89952bc64f5ae1b075b653f8a9daa02fd8d90260;ds=sidebyside Add some more DecodeError constructors. --- diff --git a/src/lib/exceptions.h b/src/lib/exceptions.h index 93be3999b..5cbf69941 100644 --- a/src/lib/exceptions.h +++ b/src/lib/exceptions.h @@ -50,12 +50,20 @@ public: {} DecodeError (std::string function, std::string caller) - : std::runtime_error (String::compose("%1 failed [%2", function, caller)) + : std::runtime_error (String::compose("%1 failed [%2]", function, caller)) {} DecodeError (std::string function, std::string caller, int error) : std::runtime_error (String::compose("%1 failed [%2] (%3)", function, caller, error)) {} + + DecodeError (std::string function, std::string caller, boost::filesystem::path file) + : std::runtime_error (String::compose("%1 failed [%2] (%3)", function, caller, file.string())) + {} + + DecodeError (std::string function, std::string caller, int error, boost::filesystem::path file) + : std::runtime_error (String::compose("%1 failed [%2] (%3) (%4)", function, caller, error, file.string())) + {} };