Jpp  test_elongated_shower_pde
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
Exception Class Reference

General exception. More...

#include <Exception.hh>

Inheritance diagram for Exception:

Public Member Functions

 Exception (const std::string &error)
 Constructor. More...
 
 ~Exception () throw ()
 Destructor. More...
 
virtual const char * what () const throw ()
 Get error message. More...
 

Static Public Member Functions

static std::ostream & getOstream ()
 Get output stream for conversion of exception. More...
 

Private Attributes

const std::string buffer
 

Friends

std::ostream & operator<< (std::ostream &out, const Exception &exception)
 Print error message of JException. More...
 

Detailed Description

General exception.

Definition at line 13 of file Exception.hh.

Constructor & Destructor Documentation

Exception::Exception ( const std::string &  error)
inline

Constructor.

Parameters
errorerror message

Definition at line 20 of file Exception.hh.

20  :
21  std::exception(),
22  buffer(error)
23  {}
const std::string buffer
Definition: Exception.hh:73
Exception::~Exception ( )
throw (
)
inline

Destructor.

Definition at line 29 of file Exception.hh.

30  {}

Member Function Documentation

virtual const char* Exception::what ( ) const
throw (
)
inlinevirtual

Get error message.

Returns
error message

Definition at line 38 of file Exception.hh.

39  {
40  return buffer.c_str();
41  }
const std::string buffer
Definition: Exception.hh:73
static std::ostream& Exception::getOstream ( )
inlinestatic

Get output stream for conversion of exception.

Note that the ostream is emptied before use.

Returns
ostream

Definition at line 63 of file Exception.hh.

64  {
65  static std::ostringstream buffer;
66 
67  buffer.str("");
68 
69  return buffer;
70  }
const std::string buffer
Definition: Exception.hh:73

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const Exception exception 
)
friend

Print error message of JException.

Parameters
outoutput stream
exceptionexception

Definition at line 50 of file Exception.hh.

51  {
52  return out << exception.what();
53  }
virtual const char * what() const
Get error message.
Definition: Exception.hh:38

Member Data Documentation

const std::string Exception::buffer
private

Definition at line 73 of file Exception.hh.


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