Public Member Functions
Tonido::Exception Class Reference

Base class for all exceptions defined in the Bootstrap library. More...

Inherits std::exception.

List of all members.

Public Member Functions

 Exception (const std::string &a_msg)
 Constructor.
 Exception (const std::string &a_msg, const Data::RawData::SharedPtr &a_pRawData)
 Exception (const std::string &a_msg, const std::string &a_arg, const Data::RawData::SharedPtr &a_pRawData)
 Exception (const std::string &a_msg, const Exception &a_nested)
 Constructor.
 Exception (const Exception &exc)
 ~Exception () throw ()
 Destructor.
Exceptionoperator= (const Exception &exc)
 Assignment Operator.
virtual const char * name () const throw ()
 Returns a static string describing the exception.
virtual const char * className () const throw ()
 Returns the name of the exception class.
virtual const char * what () const throw ()
 Returns the message text as a C string.
const Exceptionnested () const
 Returns a pointer to the nested exception, or null.
const std::string & message () const
 Returns the message text.
const Data::RawData::SharedPtr & rawData () const
 Returns the RawData associated with this exception.
std::string displayText () const
 Returns a string consisting of the message name and the message text.
virtual Exceptionclone () const
 Creates an exact copy of the exception.
virtual void rethrow () const
 (Re)Throws the exception.

Detailed Description

Base class for all exceptions defined in the Bootstrap library.

This is a standard exception that can be thrown by many Bootstrap API functions.

Note that this is similar to the Poco Exception in structure

A Exception can also contain some raw data that could give more information about an error. Usually this structure is an error log.


Constructor & Destructor Documentation

Tonido::Exception::Exception ( const std::string &  a_msg)

Constructor.

Details if needed

Tonido::Exception::Exception ( const std::string &  a_msg,
const Exception a_nested 
)

Constructor.

Creates an exception and stores a clone of the nested exception.

Tonido::Exception::~Exception ( ) throw ()

Destructor.

Destroys the exception and deletes the nested exception.


Member Function Documentation

Exception * Tonido::Exception::clone ( ) const [virtual]

Creates an exact copy of the exception.

The copy can later be thrown again by invoking rethrow() on it

void Tonido::Exception::rethrow ( ) const [virtual]

(Re)Throws the exception.

This is useful for temporarily storing a copy of an exception (see clone()), then throwing it again.


Generated on Wed Oct 12 2011 21:46:53. © CodeLathe LLC 2007-2011. All Rights Reserved.