Botan 1.10.17
tls_exceptn.h
Go to the documentation of this file.
1/*
2* Exceptions
3* (C) 2004-2006 Jack Lloyd
4*
5* Released under the terms of the Botan license
6*/
7
8#ifndef BOTAN_TLS_EXCEPTION_H__
9#define BOTAN_TLS_EXCEPTION_H__
10
11#include <botan/exceptn.h>
12#include <botan/tls_magic.h>
13
14namespace Botan {
15
16/**
17* Exception Base Class
18*/
19class BOTAN_DLL TLS_Exception : public Exception
20 {
21 public:
22 Alert_Type type() const throw() { return alert_type; }
23
25 const std::string& err_msg = "Unknown error") :
26 Exception(err_msg), alert_type(type) {}
27
28 private:
29 Alert_Type alert_type;
30 };
31
32/**
33* Unexpected_Message Exception
34*/
35struct BOTAN_DLL Unexpected_Message : public TLS_Exception
36 {
37 Unexpected_Message(const std::string& err) :
39 };
40
41}
42
43#endif
TLS_Exception(Alert_Type type, const std::string &err_msg="Unknown error")
Definition tls_exceptn.h:24
Alert_Type type() const
Definition tls_exceptn.h:22
Alert_Type
Definition tls_magic.h:62
@ UNEXPECTED_MESSAGE
Definition tls_magic.h:64
std::runtime_error Exception
Definition exceptn.h:19
Unexpected_Message(const std::string &err)
Definition tls_exceptn.h:37