Add error code to Fastvideo exceptions.
authorCarl Hetherington <cth@carlh.net>
Mon, 10 Aug 2020 22:56:37 +0000 (00:56 +0200)
committerCarl Hetherington <cth@carlh.net>
Sun, 13 Sep 2020 18:22:43 +0000 (20:22 +0200)
src/lib/exceptions.cc
src/lib/exceptions.h

index 4df170717b3fb313f2f408b8e8a5aa8eff94e8f1..22352017ccc61fe980678335b50d12a2cf34286c 100644 (file)
@@ -139,8 +139,8 @@ VerifyError::VerifyError (string m, int n)
 }
 
 
-FastvideoError::FastvideoError (string s)
-       : runtime_error (String::compose("Fastvideo error in %1", s))
+FastvideoError::FastvideoError (string s, int code)
+       : runtime_error (String::compose("Fastvideo error in %1 (%2)", s, code))
 {
 
 }
index acb2ea9e64b0f6d108f210cb95b3cc2312e1597b..c7389a5f2eb3b28e096a95f78d71cd05fc84e17f 100644 (file)
@@ -383,7 +383,7 @@ public:
 class FastvideoError : public std::runtime_error
 {
 public:
-       explicit FastvideoError (std::string s);
+       explicit FastvideoError (std::string s, int code=0);
 };
 
 #endif