From 49fcfee3b68282cefeefff034adeb458a80d1b4f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 11 Aug 2020 00:56:37 +0200 Subject: Add error code to Fastvideo exceptions. --- src/lib/exceptions.cc | 4 ++-- src/lib/exceptions.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/exceptions.cc b/src/lib/exceptions.cc index 4df170717..22352017c 100644 --- a/src/lib/exceptions.cc +++ b/src/lib/exceptions.cc @@ -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)) { } diff --git a/src/lib/exceptions.h b/src/lib/exceptions.h index acb2ea9e6..c7389a5f2 100644 --- a/src/lib/exceptions.h +++ b/src/lib/exceptions.h @@ -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 -- cgit v1.2.3