isc::dns::Exception Class Reference

This is a base class for exceptions thrown from the DNS library module. More...

Inheritance diagram for isc::dns::Exception:
isc::dns::BadEscape isc::dns::BadLabelType isc::dns::BadPointer isc::dns::EmptyLabel isc::dns::IncompleteName isc::dns::InvalidBufferPosition isc::dns::OutOfRange isc::dns::TooLongLabel isc::dns::TooLongName

List of all members.

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.

Detailed Description

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.


Constructor & Destructor Documentation

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.

Parameters:
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.


Member Function Documentation

const char* isc::dns::Exception::getFile (  )  const

Gets the file name where the exception was thrown.

Returns:
a C-style string of the file name.
size_t isc::dns::Exception::getLine (  )  const

Gets the line number of the file where the exception was thrown.

Returns:
an integer specifying the line number.
const std::string& isc::dns::Exception::getMessage (  )  const

Gets a string describing the cause of the exception.

Returns:
the cause string.

The documentation for this class was generated from the following file:

Generated on Fri Dec 18 20:59:07 2009 for BIND by  doxygen 1.6.1