Public Member Functions | Protected Member Functions | Protected Attributes

gridripper::Exception Class Reference

Java-like exception class. More...

#include <Exception.h>

Inheritance diagram for gridripper::Exception:
gridripper::amr1d::AutoAMRCore::OutFileExistsException gridripper::amr1d::InitCond::Exception gridripper::IllegalArgumentException gridripper::io::IOException gridripper::math::expr::Expr::Error gridripper::odesolver::relax::ODERelax::RelaxationException

List of all members.

Public Member Functions

 Exception (const Exception &other)
 Copy constructor.
 Exception (const string &msg, const string &where)
 Construct an exception.
 Exception (const exception &orig, const string &where)
 Construct an exception with a starting trace.
 Exception (const exception &orig, const string &msg, const string &where)
 Construct an exception with a starting trace.
void addLocation (const string &where)
 Adds a location (method name) to the trace.
virtual const char * what () const throw ()
 Gets the error message.
virtual const char * getTrace () const
 Gets the trace.

Protected Member Functions

 Exception ()
 Message and trace initialized to NULL.
void addTraceIfPossible (const exception &ex)
 Initializes with the specified exception's trace that it also an instance of a subclass of Exception.

Protected Attributes

char * message
 Error message.
char * trace
 Stack trace.

Detailed Description

Java-like exception class.

Author:
Peter Csizmadia
Version:
0.5, 01/06/2009
Since:
GridRipper 0.4, 12/19/2006

Constructor & Destructor Documentation

gridripper::Exception::Exception ( const string &  msg,
const string &  where 
)

Construct an exception.

Parameters:
msg error message
where current location (method name)

Reimplemented in gridripper::amr1d::InitCond::Exception.

gridripper::Exception::Exception ( const exception &  orig,
const string &  where 
)

Construct an exception with a starting trace.

Parameters:
orig original exception containing the source of the trace
where current location (method name)

Reimplemented in gridripper::amr1d::InitCond::Exception.

gridripper::Exception::Exception ( const exception &  orig,
const string &  msg,
const string &  where 
)

Construct an exception with a starting trace.

Parameters:
orig original exception containing the source of the trace
msg error message
where current location (method name)

Reimplemented in gridripper::amr1d::InitCond::Exception.

gridripper::Exception::Exception (  )  [protected]

Message and trace initialized to NULL.


Member Function Documentation

void gridripper::Exception::addLocation ( const string &  where  ) 

Adds a location (method name) to the trace.

virtual const char* gridripper::Exception::getTrace (  )  const [inline, virtual]

Gets the trace.

virtual const char* gridripper::Exception::what (  )  const throw () [inline, virtual]

Gets the error message.


Member Data Documentation

char* gridripper::Exception::message [protected]

Error message.

char* gridripper::Exception::trace [protected]

Stack trace.


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