Public Member Functions | Static Public Member Functions | Static Private Attributes | List of all members
oomph::OomphLibError Class Reference

#include <oomph_definitions.h>

+ Inheritance diagram for oomph::OomphLibError:

Public Member Functions

 OomphLibError (const std::string &error_description, const std::string &function_name, const char *location)
 Constructor requires the error description and the function in which the error occured and the location provided by the OOMPH_EXCEPTION_LOCATION macro. More...
 
- Public Member Functions inherited from oomph::OomphLibException
void disable_error_message ()
 Suppress issueing of the error message in destructor (useful if error is caught successfully!) More...
 

Static Public Member Functions

static void set_stream_pt (std::ostream *const &stream_pt)
 Static member function used to specify the error stream, which must be passed as a pointer because streams cannot be copied. More...
 
static void set_output_width (const unsigned &output_width)
 Static member function used to specify the width (in characters) of the error stream. More...
 

Static Private Attributes

static std::ostream * Stream_pt = &std::cerr
 Output stream that is used to write the errors. More...
 
static unsigned Output_width = 70
 Width in characters of the output report. More...
 

Additional Inherited Members

- Protected Member Functions inherited from oomph::OomphLibException
 OomphLibException (const std::string &error_description, const std::string &function_name, const char *location, const std::string &exception_type, std::ostream &exception_stream, const unsigned &output_width, bool list_trace_back)
 Constructor takes the error description, function name and a location string provided by the OOMPH_EXCEPTION_LOCATION macro and combines them into a standard header. The exception type will be the string "WARNING" or "ERROR" and the message is written to the exception_stream, with a specified output_width. Optionally provide a traceback of the function calls. More...
 
 ~OomphLibException () throw ()
 The destructor cannot throw an exception (C++ STL standard) More...
 
- Protected Attributes inherited from oomph::OomphLibException
std::ostream * Exception_stream_pt
 Exception stream to which we write message in destructor. More...
 
std::stringstream * Exception_stringstream_pt
 String stream that records the error message. More...
 
bool Suppress_error_message
 Boolean to suppress issuing of the error message in destructor (useful if error is caught successfully!) More...
 

Detailed Description

An OomphLibError object which should be thrown when an run-time error is encountered. The error stream and stream width can be specified. The default is cerr with a width of 70 characters.

Definition at line 225 of file oomph_definitions.h.

Constructor & Destructor Documentation

oomph::OomphLibError::OomphLibError ( const std::string &  error_description,
const std::string &  function_name,
const char *  location 
)
inline

Constructor requires the error description and the function in which the error occured and the location provided by the OOMPH_EXCEPTION_LOCATION macro.

Definition at line 238 of file oomph_definitions.h.

Member Function Documentation

static void oomph::OomphLibError::set_output_width ( const unsigned &  output_width)
inlinestatic

Static member function used to specify the width (in characters) of the error stream.

Definition at line 252 of file oomph_definitions.h.

static void oomph::OomphLibError::set_stream_pt ( std::ostream *const &  stream_pt)
inlinestatic

Static member function used to specify the error stream, which must be passed as a pointer because streams cannot be copied.

Definition at line 247 of file oomph_definitions.h.

Member Data Documentation

unsigned oomph::OomphLibError::Output_width = 70
staticprivate

Width in characters of the output report.

Default output width for OomphLibErrors (70)

Definition at line 231 of file oomph_definitions.h.

std::ostream * oomph::OomphLibError::Stream_pt = &std::cerr
staticprivate

Output stream that is used to write the errors.

Default output stream for OomphLibErorrs (cerr)

Definition at line 228 of file oomph_definitions.h.


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