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

An OomphLibWarning object which should be created as a temporary object to issue a warning. The warning stream and stream width can be specified. The default is cerr with a width of 70 characters. More...

#include <oomph_definitions.h>

+ Inheritance diagram for oomph::OomphLibWarning:

Public Member Functions

 OomphLibWarning (const std::string &warning_description, const std::string &function_name, const char *location)
 Constructor requires the warning description and the function in which the warning occurred. 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 of output. 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 OomphLibWarning object which should be created as a temporary object to issue a warning. The warning stream and stream width can be specified. The default is cerr with a width of 70 characters.

Definition at line 266 of file oomph_definitions.h.

Constructor & Destructor Documentation

◆ OomphLibWarning()

oomph::OomphLibWarning::OomphLibWarning ( const std::string &  warning_description,
const std::string &  function_name,
const char *  location 
)
inline

Constructor requires the warning description and the function in which the warning occurred.

Definition at line 277 of file oomph_definitions.h.

Member Function Documentation

◆ set_output_width()

static void oomph::OomphLibWarning::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 299 of file oomph_definitions.h.

◆ set_stream_pt()

static void oomph::OomphLibWarning::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 292 of file oomph_definitions.h.

Member Data Documentation

◆ Output_width

unsigned oomph::OomphLibWarning::Output_width = 70
staticprivate

Width of output.

Default output width for OomphLibWarnings (70)

Definition at line 272 of file oomph_definitions.h.

◆ Stream_pt

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

Output stream that is used to write the errors.

Default output stream for OomphLibWarnings(cerr)

Definition at line 269 of file oomph_definitions.h.


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