xorp

XorpException Class Reference

A base class for XORP exceptions. More...

#include <exceptions.hh>

Inheritance diagram for XorpException:
InvalidFamily InvalidNetmaskLength WrongFinderMessageType XorpReasonedException XrlArgs::BadArgs XrlAtom::BadName XrlAtom::NoData XrlAtom::WrongType

List of all members.

Public Member Functions

 XorpException (const char *init_what, const char *file, size_t line)
 Constructor for a given type for exception, file name, and file line number.
virtual ~XorpException ()
 Destructor.
const string & what () const
 Get the type of this exception.
const string where () const
 Get the location for throwing an exception.
virtual const string why () const
 Get the reason for throwing an exception.
string str () const
 Convert this exception from binary form to presentation format.

Protected Attributes

string _what
const char * _file
size_t _line

Detailed Description

A base class for XORP exceptions.


Constructor & Destructor Documentation

XorpException::XorpException ( const char *  init_what,
const char *  file,
size_t  line 
)

Constructor for a given type for exception, file name, and file line number.

Parameters:
init_whatthe type of exception.
filethe file name where the exception was thrown.
linethe line in file where the exception was thrown.

Member Function Documentation

string XorpException::str ( ) const

Convert this exception from binary form to presentation format.

Returns:
C++ string with the human-readable ASCII representation of the exception.
const string& XorpException::what ( ) const [inline]

Get the type of this exception.

Returns:
the string with the type of this exception.
const string XorpException::where ( ) const

Get the location for throwing an exception.

Returns:
the string with the location (file name and file line number) for throwing an exception.
const string XorpException::why ( ) const [virtual]

Get the reason for throwing an exception.

Returns:
the string with the reason for throwing an exception.

Reimplemented in XrlArgs::BadArgs, XrlAtom::NoData, XrlAtom::WrongType, XrlAtom::BadName, XorpReasonedException, InvalidFamily, and InvalidNetmaskLength.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations