MADNESS 0.10.1
Public Member Functions | Public Attributes | List of all members
madness::MadnessException Class Reference

Base class for exceptions thrown in MADNESS. More...

#include <madness_exception.h>

Inheritance diagram for madness::MadnessException:
Inheritance graph
[legend]
Collaboration diagram for madness::MadnessException:
Collaboration graph
[legend]

Public Member Functions

 MadnessException (const char *m, const char *a, int v, int l, const char *fn, const char *f)
 Constructor that processes the requisite information.
 
virtual const char * what () const throw ()
 Returns the error message, as specified by std::exception.
 

Public Attributes

const char * assertion
 String describing the assertion.
 
const char * filename
 File where the exception occurred.
 
const char * function
 Function where the exception occurred.
 
const int line
 Line number where the exception occurred.
 
const char * msg
 The error message.
 
const int value
 Value associated with the exception.
 

Detailed Description

Base class for exceptions thrown in MADNESS.

Most exceptions thrown in MADNESS should be derived from this.

Constructor & Destructor Documentation

◆ MadnessException()

madness::MadnessException::MadnessException ( const char *  m,
const char *  a,
int  v,
int  l,
const char *  fn,
const char *  f 
)
inline

Constructor that processes the requisite information.

Capturing the line/function/filename info is best done with the macros listed below.

Parameters
[in]mThe error message.
[in]aString describing the exception.
[in]vValue associated with the exception.
[in]lLine number where the exception occurred.
[in]fnFunction where the exception occurred.
[in]fFile where the exception occurred.

Member Function Documentation

◆ what()

virtual const char * madness::MadnessException::what ( ) const
throw (
)
inlinevirtual

Returns the error message, as specified by std::exception.

Returns
The error message.

References msg.

Member Data Documentation

◆ assertion

const char* madness::MadnessException::assertion

String describing the assertion.

◆ filename

const char* madness::MadnessException::filename

File where the exception occurred.

◆ function

const char* madness::MadnessException::function

Function where the exception occurred.

◆ line

const int madness::MadnessException::line

Line number where the exception occurred.

◆ msg

const char* madness::MadnessException::msg

The error message.

Referenced by what().

◆ value

const int madness::MadnessException::value

Value associated with the exception.


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