summaryrefslogtreecommitdiff
path: root/src/lib/exceptions.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-06-23 17:17:45 +0200
committerCarl Hetherington <cth@carlh.net>2021-06-23 17:17:45 +0200
commit89952bc64f5ae1b075b653f8a9daa02fd8d90260 (patch)
tree48eac4335d5c7736304530211dfdb9879190a7b1 /src/lib/exceptions.h
parentd0d2d6a0ca221341c59283167748193a416342a4 (diff)
Add some more DecodeError constructors.
Diffstat (limited to 'src/lib/exceptions.h')
-rw-r--r--src/lib/exceptions.h10
1 files changed, 9 insertions, 1 deletions
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()))
+ {}
};