DACE 2.0 API Manual
Differential Algebra Core Engine
Public Member Functions | Static Public Member Functions | Friends
DACE::DACEException Class Reference

#include <dace/DACEException.h>

+ Inheritance diagram for DACE::DACEException:
+ Collaboration diagram for DACE::DACEException:

Public Member Functions

 DACEException ()
 Default constructor. More...
 
 DACEException (const int exc_sv, const int exc_id)
 Constructor. More...
 
 ~DACEException () throw ()
 Destructor. More...
 
const char * what () const throw ()
 Convert exception to string. More...
 

Static Public Member Functions

static void setSeverity (const int n)
 Select the desired severity code. More...
 
static void setWarning (const bool w)
 Select the warning status. More...
 

Friends

DACE_API std::ostream & operator<< (std::ostream &out, const DACEException &ex)
 Overload output stream operator. More...
 

Detailed Description

DACEException class containing methods for error handling within the DACE C++ interface.

Constructor & Destructor Documentation

◆ DACEException() [1/2]

DACE::DACEException::DACEException ( )

Default constructor.

Create a DACEException object from an existing severity and error codes.

◆ DACEException() [2/2]

DACE::DACEException::DACEException ( const int  exc_sv,
const int  exc_id 
)

Constructor.

Create a DACEException object from given severity and ID codes.

Parameters
exc_svseverity code of the error.
exc_idID code of the error.

◆ ~DACEException()

DACE::DACEException::~DACEException ( )
throw (
)

Destructor.

Destroy the DACEException object.

Member Function Documentation

◆ setSeverity()

void DACE::DACEException::setSeverity ( const int  n)
static

Select the desired severity code.

Set a value for the severity level. Errors with severity code greater or equal to this value will generate an exception object. Severity levels are:
0 = Warning: Informative, no action required
1 = Warning: Serius, possible wrong implementation
6 = Error: Recoverable, assumptions have been made
9 = Error: Unrecoverable, new call to init is required to reinitialize DACE, interface objects are no longer valid
10 = Critical: Crash in the DACE, just printing as much as possible and dying.

Parameters
nseverity value

◆ setWarning()

void DACE::DACEException::setWarning ( const bool  w)
static

Select the warning status.

Set the current status for visualization of warnings.

Parameters
wstatus of warnings
true: turn on printing of warnings
false: turn off printing of warnings

◆ what()

const char * DACE::DACEException::what ( ) const
throw (
)

Convert exception to string.

Return a human readable error string representing this exception.

Returns
A C string containing the error message.

Friends And Related Function Documentation

◆ operator<<

DACE_API std::ostream& operator<< ( std::ostream &  out,
const DACEException ex 
)
friend

Overload output stream operator.

Overload of std::operator<< in iostream.

Parameters
[in]outstandard output stream.
[in]exException to be printed in the stream
Returns
Output stream out.

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