CPN
Computational Process Networks
Public Member Functions | Protected Attributes | Private Attributes | List of all members
AssertException Class Reference

The exception thrown by the ASSERT macro. More...

#include <ThrowingAssert.h>

+ Inheritance diagram for AssertException:
+ Collaboration diagram for AssertException:

Public Member Functions

 AssertException (const std::string &msg) throw ()
 
virtual ~AssertException () throw ()
 
virtual const char * what () const throw ()
 
std::string GetStackTrace () const
 

Protected Attributes

std::string stacktrace
 

Private Attributes

std::string message
 

Detailed Description

The exception thrown by the ASSERT macro.

Definition at line 46 of file ThrowingAssert.h.

Constructor & Destructor Documentation

AssertException::AssertException ( const std::string &  msg)
throw (
)

Definition at line 43 of file ThrowingAssert.cc.

44  : Exception(4)
45 {
46  std::ostringstream oss;
47  oss << msg << "\nBacktrace:\n" << GetStackTrace() << "\n";
48  message = oss.str();
49 }
Exception(int ignore=2)
Definition: Exception.cc:27
std::string GetStackTrace() const
Definition: Exception.h:40
std::string message
AssertException::~AssertException ( )
throw (
)
virtual

Definition at line 52 of file ThrowingAssert.cc.

52 {}

Member Function Documentation

std::string Exception::GetStackTrace ( ) const
inlineinherited
Returns
the stack trace.

Definition at line 40 of file Exception.h.

References Exception::stacktrace.

Referenced by ErrnoException::ErrnoException().

40 { return stacktrace; }
std::string stacktrace
Definition: Exception.h:42

+ Here is the caller graph for this function:

const char * AssertException::what ( ) const
throw (
)
virtual

Definition at line 54 of file ThrowingAssert.cc.

References message.

54  {
55  return message.c_str();
56 }
std::string message

Member Data Documentation

std::string AssertException::message
private

Definition at line 52 of file ThrowingAssert.h.

Referenced by what().

std::string Exception::stacktrace
protectedinherited

Definition at line 42 of file Exception.h.

Referenced by Exception::GetStackTrace().


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