aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils/exceptn.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/utils/exceptn.h')
-rw-r--r--src/lib/utils/exceptn.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/lib/utils/exceptn.h b/src/lib/utils/exceptn.h
index 7ac32288d..1e9cd68d5 100644
--- a/src/lib/utils/exceptn.h
+++ b/src/lib/utils/exceptn.h
@@ -21,12 +21,11 @@ namespace Botan {
class BOTAN_DLL Exception : public std::exception
{
public:
- Exception(const std::string& what) : m_what(what) {}
- Exception(const char* prefix, const std::string& what) : m_what(std::string(prefix) + " " + what) {}
- //const char* what() const override BOTAN_NOEXCEPT { return m_what.c_str(); }
- const char* what() const BOTAN_NOEXCEPT override { return m_what.c_str(); }
+ Exception(const std::string& msg) : m_msg(msg) {}
+ Exception(const char* prefix, const std::string& msg) : m_msg(std::string(prefix) + " " + msg) {}
+ const char* what() const BOTAN_NOEXCEPT override { return m_msg.c_str(); }
private:
- std::string m_what;
+ std::string m_msg;
};
/**
@@ -35,8 +34,8 @@ class BOTAN_DLL Exception : public std::exception
class BOTAN_DLL Invalid_Argument : public Exception
{
public:
- Invalid_Argument(const std::string& what) :
- Exception("Invalid argument", what) {}
+ Invalid_Argument(const std::string& msg) :
+ Exception("Invalid argument", msg) {}
};
/**