diff options
author | lloyd <[email protected]> | 2010-02-14 05:42:50 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-02-14 05:42:50 +0000 |
commit | 508ccf7deb5ae8acb05d3514067bf3d0cc504a62 (patch) | |
tree | 56c0002503c01af255193aca762415875775170d /src/ssl/tls_exceptn.h | |
parent | 1e596a25e32c3106b3d6e2aceb64a270a8b30713 (diff) |
Various minor SSL fixes
Diffstat (limited to 'src/ssl/tls_exceptn.h')
-rw-r--r-- | src/ssl/tls_exceptn.h | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/src/ssl/tls_exceptn.h b/src/ssl/tls_exceptn.h index 15f52b19a..ed9d990a2 100644 --- a/src/ssl/tls_exceptn.h +++ b/src/ssl/tls_exceptn.h @@ -1,32 +1,38 @@ -/* -* SSL Exceptions -* (C) 2004-2010 Jack Lloyd +/** +* Exceptions Header File +* (C) 2004-2006 Jack Lloyd * -* Distributed under the terms of the Botan license +* Released under the terms of the Botan license */ -#ifndef BOTAN_SSL_EXCEPTION_H__ -#define BOTAN_SSL_EXCEPTION_H__ +#ifndef BOTAN_TLS_EXCEPTION_H__ +#define BOTAN_TLS_EXCEPTION_H__ -#include <botan/tls_magic.h> #include <botan/exceptn.h> +#include <botan/tls_magic.h> namespace Botan { -struct BOTAN_DLL TLS_Exception : public Exception +/** +* Exception Base Class +*/ +class BOTAN_DLL TLS_Exception : public Exception { public: - Alert_Type type() const { return alert_type; } + Alert_Type type() const throw() { return alert_type; } - TLS_Exception(Alert_Type type, const std::string& msg) : - Exception("SSL/TLS error: " + msg), alert_type(type) - {} + TLS_Exception(Alert_Type type, + const std::string& err_msg = "Unknown error") : + Exception(err_msg), alert_type(type) {} private: Alert_Type alert_type; }; -struct BOTAN_DLL Unexpected_Message : public TLS_Exception +/** +* Unexpected_Message Exception +*/ +struct Unexpected_Message : public TLS_Exception { Unexpected_Message(const std::string& err) : TLS_Exception(UNEXPECTED_MESSAGE, err) {} |