aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-11-14 09:12:35 -0500
committerJack Lloyd <[email protected]>2017-11-14 09:12:35 -0500
commitcce28dc1da0ee946495b89525d74e224e6743cb3 (patch)
treefb7a8ce1ca8cda630281223c763c64833fdb17f8 /src/lib
parentece37db0992107bdc9416c75427047bf94f5be29 (diff)
Add a second constructor to Decoding_Error which takes an exception string.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/utils/exceptn.cpp3
-rw-r--r--src/lib/utils/exceptn.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/utils/exceptn.cpp b/src/lib/utils/exceptn.cpp
index 3fa7dfd3e..a72e45ba4 100644
--- a/src/lib/utils/exceptn.cpp
+++ b/src/lib/utils/exceptn.cpp
@@ -79,6 +79,9 @@ Decoding_Error::Decoding_Error(const std::string& name) :
Invalid_Argument("Decoding error: " + name)
{}
+Decoding_Error::Decoding_Error(const std::string& name, const char* exception_message) :
+ Invalid_Argument("Decoding error: " + name + " failed with exception " + exception_message) {}
+
Integrity_Failure::Integrity_Failure(const std::string& msg) :
Exception("Integrity failure: " + msg)
{}
diff --git a/src/lib/utils/exceptn.h b/src/lib/utils/exceptn.h
index e82889b5a..2d242339d 100644
--- a/src/lib/utils/exceptn.h
+++ b/src/lib/utils/exceptn.h
@@ -179,6 +179,8 @@ class BOTAN_PUBLIC_API(2,0) Decoding_Error : public Invalid_Argument
{
public:
explicit Decoding_Error(const std::string& name);
+
+ Decoding_Error(const std::string& name, const char* exception_message);
};
/**