summaryrefslogtreecommitdiff
path: root/src/lib/exceptions.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-04-29 22:59:45 +0200
committerCarl Hetherington <cth@carlh.net>2021-05-01 01:31:57 +0200
commitc699b77bce027c3ab70f04c411dc43f3ba628b28 (patch)
treef3164920beae728d93847f6560dc644258fec7d7 /src/lib/exceptions.h
parente29ce33a36c2e20444d57196defc86d5072bce81 (diff)
Switch encoding to ffmpeg send/receive API.
Diffstat (limited to 'src/lib/exceptions.h')
-rw-r--r--src/lib/exceptions.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/lib/exceptions.h b/src/lib/exceptions.h
index 8bce0c8ab..5b7baf0e5 100644
--- a/src/lib/exceptions.h
+++ b/src/lib/exceptions.h
@@ -46,11 +46,11 @@ public:
{}
explicit DecodeError (std::string function, std::string caller)
- : std::runtime_error (String::compose("%1 failed in %2", function, caller))
+ : std::runtime_error (String::compose("%1 failed [%2", function, caller))
{}
explicit DecodeError (std::string function, std::string caller, int error)
- : std::runtime_error (String::compose("%1 failed in %2 (%3)", function, caller, error))
+ : std::runtime_error (String::compose("%1 failed [%2] (%3)", function, caller, error))
{}
};
@@ -62,6 +62,7 @@ public:
{}
};
+
/** @class EncodeError
* @brief A low-level problem with an encoder.
*/
@@ -71,8 +72,17 @@ public:
explicit EncodeError (std::string s)
: std::runtime_error (s)
{}
+
+ explicit EncodeError (std::string function, std::string caller)
+ : std::runtime_error (String::compose("%1 failed [%2]", function, caller))
+ {}
+
+ explicit EncodeError (std::string function, std::string caller, int error)
+ : std::runtime_error (String::compose("%1 failed [%2] (%3)", function, caller, error))
+ {}
};
+
/** @class FileError.
* @brief Parent class for file-related errors.
*/