29#ifdef OOMPH_HAS_STACKTRACE
44 namespace Global_timings
60 namespace TerminateHelper
81 (*Error_message_stream_pt) << (*Exception_stringstream_pt).str();
130 (*Exception_stream_pt) << (*Exception_stringstream_pt).str();
151 : std::runtime_error(
"OomphException")
198#ifdef OOMPH_HAS_STACKTRACE
209 (*Exception_stringstream_pt) <<
"=";
211 (*Exception_stringstream_pt) << std::endl << std::endl;
222 (*TerminateHelper::Exception_stringstream_pt)
223 << (*Exception_stringstream_pt).str();
256 namespace Global_output_stream
273 namespace Global_unsigned
289 namespace Global_string_for_annotation
A small nullstream class that throws away everything sent to it.
This class is a wrapper to a stream and an output modifier that is used to control the "info" output ...
static unsigned Output_width
Width in characters of the output report.
static std::ostream * Stream_pt
Output stream that is used to write the errors.
~OomphLibException()
The destructor cannot throw an exception (C++ STL standard)
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_EX...
std::stringstream * Exception_stringstream_pt
String stream that records the error message.
std::ostream * Exception_stream_pt
Exception stream to which we write message in destructor.
bool Suppress_error_message
Boolean to suppress issuing of the error message in destructor (useful if error is caught successfull...
OomphLibQuietException()
Constructor.
static unsigned Output_width
Width of output.
static std::ostream * Stream_pt
Output stream that is used to write the errors.
A base class that contains a single virtual member function: The () operator that may be used to modi...
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
std::ofstream * Outfile
Output stream.
std::vector< std::string > String
Storage for strings that may be used for global annotations. This is global data and you use it at yo...
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
bool Doc_comprehensive_timings
Global boolean to switch on comprehensive timing – can probably be declared const false when developm...
unsigned Number
The unsigned.
void clean_up_memory()
Clean up function that deletes anything dynamically allocated in this namespace.
void suppress_exception_error_messages()
Flush string stream of error messages (call when error has been caught)
void setup()
Setup terminate helper.
void spawn_errors_from_uncaught_errors()
Function to spawn messages from uncaught errors.
std::stringstream * Exception_stringstream_pt
String stream that records the error message.
std::ostream * Error_message_stream_pt
Stream to output error messages.
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Nullstream oomph_nullstream
Single (global) instantiation of the Nullstream.
OutputModifier default_output_modifier
Single global instatiation of the default output modifier.
OomphInfo oomph_info
Single (global) instantiation of the OomphInfo object – this is used throughout the library as a "rep...
static void print_stacktrace(std::ostream &exception_stream, unsigned int max_frames=63)