1 #ifndef __FASTJET_ERROR_HH__
2 #define __FASTJET_ERROR_HH__
36 #include "fastjet/internal/base.hh"
37 #include "fastjet/config.h"
38 #if (!defined(FASTJET_HAVE_EXECINFO_H)) || defined(__FJCORE__)
39 #include "fastjet/LimitedWarning.hh"
42 FASTJET_BEGIN_NAMESPACE
57 Error(
const std::string & message);
63 std::string
message()
const {
return _message;}
74 static void set_print_backtrace(
bool enabled);
85 #if defined(FASTJET_HAVE_EXECINFO_H) && defined(FASTJET_HAVE_DEMANGLING_SUPPORT)
87 std::string _demangle(
const char* symbol);
92 static bool _print_errors;
93 static bool _print_backtrace;
94 static std::ostream * _default_ostr;
95 #if (!defined(FASTJET_HAVE_EXECINFO_H)) || defined(__FJCORE__)
116 InternalError(
const std::string & message_in) :
Error(std::string(
"*** CRITICAL INTERNAL FASTJET ERROR *** CONTACT THE AUTHORS *** ") + message_in){ }
119 FASTJET_END_NAMESPACE
121 #endif // __FASTJET_ERROR_HH__
InternalError(const std::string &message_in)
ctor with error message: just add a bit of info to the message and pass it to the base class
std::string message() const
the error message
std::string description() const
an alternative access to the error message (more standard)
Error()
default constructors
virtual ~Error()
virtual dummy dtor
static void set_print_errors(bool print_errors)
controls whether the error message (and the backtrace, if its printing is enabled) is printed out or ...
static void set_default_stream(std::ostream *ostr)
sets the default output stream for all errors; by default cerr; if it's null then error output is sup...