Pothos  0.2.1-g9f04573d
The Pothos dataflow programming software suite
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros
Public Member Functions | Protected Member Functions | List of all members
Pothos::Exception Class Reference

#include <Exception.hpp>

Inheritance diagram for Pothos::Exception:
Inheritance graph
[legend]

Public Member Functions

 Exception (const std::string &msg, int code=0)
 
 Exception (const std::string &msg, const std::string &arg, int code=0)
 Creates an exception. More...
 
 Exception (const std::string &msg, const Exception &nested, int code=0)
 Creates an exception. More...
 
 Exception (const Exception &exc)
 
 ~Exception () throw ()
 Copy constructor. More...
 
Exceptionoperator= (const Exception &exc)
 Destroys the exception and deletes the nested exception. More...
 
virtual const char * name () const throw ()
 Assignment operator. More...
 
virtual const char * className () const throw ()
 Returns a static string describing the exception. More...
 
virtual const char * what () const throw ()
 Returns the name of the exception class. More...
 
const Exceptionnested () const
 
const std::string & message () const
 
int code () const
 Returns the message text. More...
 
std::string displayText () const
 Returns the exception code if defined. More...
 
virtual Exceptionclone () const
 
virtual void rethrow () const
 

Protected Member Functions

 Exception (int code=0)
 
void message (const std::string &msg)
 Standard constructor. More...
 
void extendedMessage (const std::string &arg)
 Sets the message for the exception. More...
 

Detailed Description

This is the base class for all exceptions defined in the Pothos class library.

Constructor & Destructor Documentation

Pothos::Exception::Exception ( const std::string &  msg,
int  code = 0 
)
Pothos::Exception::Exception ( const std::string &  msg,
const std::string &  arg,
int  code = 0 
)

Creates an exception.

Pothos::Exception::Exception ( const std::string &  msg,
const Exception nested,
int  code = 0 
)

Creates an exception.

Pothos::Exception::Exception ( const Exception exc)

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

Pothos::Exception::~Exception ( )
throw (
)

Copy constructor.

Pothos::Exception::Exception ( int  code = 0)
protected

(Re)Throws the exception.

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

Member Function Documentation

virtual const char* Pothos::Exception::className ( ) const
throw (
)
virtual
virtual Exception* Pothos::Exception::clone ( ) const
virtual
int Pothos::Exception::code ( ) const
inline

Returns the message text.

std::string Pothos::Exception::displayText ( ) const

Returns the exception code if defined.

void Pothos::Exception::extendedMessage ( const std::string &  arg)
protected

Sets the message for the exception.

const std::string & Pothos::Exception::message ( ) const
inline

Returns a pointer to the nested exception, or null if no nested exception exists.

void Pothos::Exception::message ( const std::string &  msg)
inlineprotected

Standard constructor.

virtual const char* Pothos::Exception::name ( ) const
throw (
)
virtual
const Exception * Pothos::Exception::nested ( ) const
inline

Returns a static string describing the exception.

Same as name(), but for compatibility with std::exception.

Exception& Pothos::Exception::operator= ( const Exception exc)

Destroys the exception and deletes the nested exception.

virtual void Pothos::Exception::rethrow ( ) const
virtual
virtual const char* Pothos::Exception::what ( ) const
throw (
)
virtual

Returns the name of the exception class.


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