This is a base class for exceptions thrown from the DNS library module. More...
Public Member Functions | |
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. | |
virtual | ~Exception () |
The destructor. | |
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. |
This is a base class for exceptions thrown from the DNS library module.
Normally, the exceptions are thrown via a convenient shortcut macro, dns_throw, which automatically gives trivial parameters for the exception such as the file name and line number where the exception is triggered.
isc::dns::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. |
virtual isc::dns::Exception::~Exception | ( | ) | [virtual] |
The destructor.
const char* isc::dns::Exception::getFile | ( | ) | const |
Gets the file name where the exception was thrown.
size_t isc::dns::Exception::getLine | ( | ) | const |
Gets the line number of the file where the exception was thrown.
const std::string& isc::dns::Exception::getMessage | ( | ) | const |
Gets a string describing the cause of the exception.