Pothos  0.7.0-gf7fbae99
The Pothos dataflow programming software suite
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

◆ Exception() [1/5]

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

◆ Exception() [2/5]

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

Creates an exception.

◆ Exception() [3/5]

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

Creates an exception.

◆ Exception() [4/5]

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

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

◆ ~Exception()

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

Copy constructor.

◆ Exception() [5/5]

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

◆ className()

virtual const char* Pothos::Exception::className ( ) const
throw (
)
virtual

◆ clone()

virtual Exception* Pothos::Exception::clone ( ) const
virtual

◆ code()

int Pothos::Exception::code ( ) const
inline

Returns the message text.

◆ displayText()

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

Returns the exception code if defined.

◆ extendedMessage()

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

Sets the message for the exception.

◆ message() [1/2]

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

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

◆ message() [2/2]

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

Standard constructor.

◆ name()

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

◆ nested()

const Exception * Pothos::Exception::nested ( ) const
inline

Returns a static string describing the exception.

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

◆ operator=()

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

Destroys the exception and deletes the nested exception.

◆ rethrow()

virtual void Pothos::Exception::rethrow ( ) const
virtual

◆ what()

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: