COPASI API  4.16.103
Public Member Functions | Protected Attributes | List of all members
StdException Class Reference

#include <StdException.h>

Inheritance diagram for StdException:
Inheritance graph
[legend]
Collaboration diagram for StdException:
Collaboration graph
[legend]

Public Member Functions

 StdException () throw ()
 
 StdException (const std::string what) throw ()
 
virtual const char * what () const throw ()
 
virtual ~StdException () throw ()
 

Protected Attributes

std::string message
 

Detailed Description

Simple exception class that implements the what() function of std::exception to specify an error message.

Definition at line 23 of file StdException.h.

Constructor & Destructor Documentation

StdException::StdException ( )
throw (
)

Constructor that sets the error message object to "Error."

Definition at line 18 of file StdException.cpp.

References message.

19 {
20  this->message = "Error.";
21 }
std::string message
Definition: StdException.h:47
StdException::StdException ( const std::string  what)
throw (
)
explicit

Constructor that sets the error message object to the string given.

Definition at line 26 of file StdException.cpp.

27 {
28  this->message = what;
29 };
std::string message
Definition: StdException.h:47
virtual const char * what() const
StdException::~StdException ( )
throw (
)
virtual

Destructor that does nothing.

Definition at line 34 of file StdException.cpp.

35 {}

Member Function Documentation

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

Returns the error message object as a character array.

Definition at line 40 of file StdException.cpp.

References message.

41 {
42  return this->message.c_str();
43 }
std::string message
Definition: StdException.h:47

Member Data Documentation

std::string StdException::message
protected

Definition at line 47 of file StdException.h.

Referenced by StdException(), and what().


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