aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls/tls_exceptn.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/tls/tls_exceptn.h')
-rw-r--r--src/lib/tls/tls_exceptn.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/tls/tls_exceptn.h b/src/lib/tls/tls_exceptn.h
index 572ff1885..e7d8c1963 100644
--- a/src/lib/tls/tls_exceptn.h
+++ b/src/lib/tls/tls_exceptn.h
@@ -16,7 +16,7 @@ namespace Botan {
namespace TLS {
/**
-* Exception Base Class
+* TLS Exception Base Class
*/
class BOTAN_PUBLIC_API(2,0) TLS_Exception : public Exception
{
@@ -27,6 +27,10 @@ class BOTAN_PUBLIC_API(2,0) TLS_Exception : public Exception
const std::string& err_msg = "Unknown error") :
Exception(err_msg), m_alert_type(type) {}
+ int error_code() const noexcept override { return static_cast<int>(m_alert_type); }
+
+ ErrorType error_type() const noexcept override { return ErrorType::TLSError; }
+
private:
Alert::Type m_alert_type;
};