aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils/exceptn.h
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-08-22 15:54:04 -0400
committerJack Lloyd <[email protected]>2018-08-22 15:54:04 -0400
commit56468f8a389350516de67005c8e780c4f7743aab (patch)
treef151e3421fe9532087c9b62468e1a02344086478 /src/lib/utils/exceptn.h
parent2fc2598ebab23aa63f7be30c8a2eff6afb262fb3 (diff)
Simplify exception messages
Remove "Invalid argument" and "Decoding Error" prefixes
Diffstat (limited to 'src/lib/utils/exceptn.h')
-rw-r--r--src/lib/utils/exceptn.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/utils/exceptn.h b/src/lib/utils/exceptn.h
index f2896aa83..efa52580c 100644
--- a/src/lib/utils/exceptn.h
+++ b/src/lib/utils/exceptn.h
@@ -23,6 +23,8 @@ class BOTAN_PUBLIC_API(2,0) Exception : public std::exception
Exception(const char* prefix, const std::string& msg);
explicit Exception(const std::string& msg);
const char* what() const BOTAN_NOEXCEPT override { return m_msg.c_str(); }
+ protected:
+ Exception(const std::string& msg, const std::exception& e);
private:
std::string m_msg;
};
@@ -36,7 +38,9 @@ class BOTAN_PUBLIC_API(2,0) Invalid_Argument : public Exception
explicit Invalid_Argument(const std::string& msg);
explicit Invalid_Argument(const std::string& msg, const std::string& where);
-};
+
+ Invalid_Argument(const std::string& msg, const std::exception& e);
+ };
/**
* Unsupported_Argument Exception
@@ -178,6 +182,8 @@ class BOTAN_PUBLIC_API(2,0) Decoding_Error : public Invalid_Argument
explicit Decoding_Error(const std::string& name);
Decoding_Error(const std::string& name, const char* exception_message);
+
+ Decoding_Error(const std::string& msg, const std::exception& e);
};
/**