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;}
71 static void set_print_backtrace(
bool enabled);
82 #if defined(FASTJET_HAVE_EXECINFO_H) && defined(FASTJET_HAVE_DEMANGLING_SUPPORT)
84 std::string _demangle(
const char* symbol);
89 static bool _print_errors;
90 static bool _print_backtrace;
91 static std::ostream * _default_ostr;
92 #if (!defined(FASTJET_HAVE_EXECINFO_H)) || defined(__FJCORE__)
113 InternalError(
const std::string & message_in) :
Error(
std::string(
"*** CRITICAL INTERNAL FASTJET ERROR *** CONTACT THE AUTHORS *** ") + message_in){ }
117 FASTJET_END_NAMESPACE
119 #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 ...
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 ...
class to provide facilities for giving warnings up to some maximum number of times and to provide glo...
Error()
default constructors
base class corresponding to errors that can be thrown by FastJet
class corresponding to critical internal errors
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...
std::string message() const
the error message