![]() |
Kea 3.1.1
|
This is a base class for exceptions thrown from the DNS library module. More...
#include <exceptions.h>
Public Member Functions | |
Methods Reimplemented against the Standard Exception Class | |
virtual const char * | what () const throw () |
Returns a C-style character string of the cause of the exception. | |
virtual const char * | what (bool verbose) const throw () |
Returns a C-style character string of the cause of exception. | |
Getter Methods | |
const std::string & | getMessage () const |
Gets a string describing the cause of the exception. | |
const char * | getFile () const |
Gets the file name where the exception was thrown. | |
size_t | getLine () const |
Gets the line number of the file where the exception was thrown. | |
Constructors and Destructor | |
Exception (const char *file, size_t line, const char *what) | |
Constructor for a given type for exceptions with file name and file line number. | |
Exception (const char *file, size_t line, const std::string &what) | |
Constructor for a given type for exceptions with file name and file line number. | |
virtual | ~Exception () throw () |
The destructor. | |
This is a base class for exceptions thrown from the DNS library module.
Normally, the exceptions are thrown via a convenient shortcut macro, isc_throw, which automatically gives trivial parameters for the exception such as the file name and line number where the exception is triggered.
Definition at line 23 of file exceptions/exceptions.h.
isc::Exception::Exception | ( | const char * | file, |
size_t | line, | ||
const char * | what ) |
Constructor for a given type for exceptions with file name and file line number.
file | the file name where the exception was thrown. |
line | the line in file where the exception was thrown. |
what | a description (type) of the exception. |
Definition at line 17 of file exceptions/exceptions.cc.
isc::Exception::Exception | ( | const char * | file, |
size_t | line, | ||
const std::string & | what ) |
Constructor for a given type for exceptions with file name and file line number.
file | the file name where the exception was thrown. |
line | the line in file where the exception was thrown. |
what | a description (type) of the exception. |
Definition at line 24 of file exceptions/exceptions.cc.
|
inlinevirtual |
The destructor.
Definition at line 46 of file exceptions/exceptions.h.
|
inline |
Gets the file name where the exception was thrown.
Definition at line 90 of file exceptions/exceptions.h.
|
inline |
Gets the line number of the file where the exception was thrown.
Definition at line 95 of file exceptions/exceptions.h.
|
inline |
Gets a string describing the cause of the exception.
Definition at line 85 of file exceptions/exceptions.h.
|
virtual |
Returns a C-style character string of the cause of the exception.
Note: we normally don't use exception specifications, but this is an "exception" to that policy as it's enforced by the base class.
Definition at line 32 of file exceptions/exceptions.cc.
|
virtual |
Returns a C-style character string of the cause of exception.
With verbose set to true, also returns file name and line numbers. Note that we can't simply define a single what() method with parameters, as the compiler would complain that it shadows the base class method.
verbose | if set to true, filename and line number will be added. |
Definition at line 37 of file exceptions/exceptions.cc.