1  #ifndef __FASTJET_ERROR_HH__ 
    2 #define __FASTJET_ERROR_HH__ 
   36 #include "fastjet/internal/base.hh" 
   37 #include "fastjet/config.h" 
   39 #if (!defined(FASTJET_HAVE_EXECINFO_H)) || defined(__FJCORE__) 
   40 #include "fastjet/LimitedWarning.hh" 
   42 #ifdef FASTJET_HAVE_LIMITED_THREAD_SAFETY 
   44 #endif // FASTJET_HAVE_LIMITED_THREAD_SAFETY 
   46 FASTJET_BEGIN_NAMESPACE      
 
   61   Error(
const std::string & message);
 
   67   std::string 
message()
 const {
return _message;}
 
   78   static void set_print_backtrace(
bool enabled);
 
   89 #if defined(FASTJET_HAVE_EXECINFO_H) && defined(FASTJET_HAVE_DEMANGLING_SUPPORT) 
   91   std::string _demangle(
const char* symbol);
 
   97 #ifdef FASTJET_HAVE_LIMITED_THREAD_SAFETY 
   98   static std::atomic<bool> _print_errors;           
 
   99   static std::atomic<bool> _print_backtrace;        
 
  100   static std::atomic<std::ostream *> _default_ostr; 
 
  102   static bool _print_errors;           
 
  103   static bool _print_backtrace;        
 
  104   static std::ostream * _default_ostr; 
 
  105 #endif // FASTJET_HAVE_LIMITED_THREAD_SAFETY 
  108 #if (!defined(FASTJET_HAVE_EXECINFO_H)) || defined(__FJCORE__) 
  129   InternalError(
const std::string & message_in) : 
Error(std::string(
"*** CRITICAL INTERNAL FASTJET ERROR *** CONTACT THE AUTHORS *** ") + message_in){ }
 
  132 FASTJET_END_NAMESPACE
 
  134 #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...
 
class corresponding to critical internal errors
 
class to provide facilities for giving warnings up to some maximum number of times and to provide glo...
 
base class corresponding to errors that can be thrown by FastJet