xorp

XorpReasonedException Class Reference

A base class for XORP exceptions that keeps the reason for exception. More...

#include <exceptions.hh>

Inheritance diagram for XorpReasonedException:
XorpException AddressFamilyMismatch BadExternalRoute BadFace BadFinderMessageFormat BadLinkCode BadLinkCoverage BadLogicalLink BadMidEntry BadNeighbor BadPacketException BadPeer BadTopologyEntry BadTwoHopCoverage BadTwoHopLink BadTwoHopNode CorruptMessage InitError InvalidAddress InvalidBufferOffset InvalidCast InvalidLinkTuple InvalidMessage InvalidPacket InvalidPort InvalidString NoFinder NoSuchAddress ParseError PolicyException PVariableExists PVariableLocked PVariableNotEnabled PVariableNotLocked PVariableUnknown UnresolvableHost UnusableMessage VrrpException XrlAtomList::BadAtomType XrlAtomList::InvalidIndex XrlParserInputException XrlPFConstructorError

List of all members.

Public Member Functions

 XorpReasonedException (const char *init_what, const char *file, size_t line, const string &init_why)
 Constructor for a given type for exception, file name, file line number, and a reason.
const string why () const
 Get the reason for throwing an exception.

Protected Attributes

string _why

Detailed Description

A base class for XORP exceptions that keeps the reason for exception.


Constructor & Destructor Documentation

XorpReasonedException::XorpReasonedException ( const char *  init_what,
const char *  file,
size_t  line,
const string &  init_why 
)

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

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

Member Function Documentation

const string XorpReasonedException::why ( ) const [virtual]

Get the reason for throwing an exception.

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

Reimplemented from XorpException.


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