DAS  3.0
Das Analysis System
Error

#include <fjcore.hh>

+ Inheritance diagram for Error:
+ Collaboration diagram for Error:

Public Member Functions

 Error ()
 
 Error (const std::string &message)
 
virtual ~Error ()
 
std::string message () const
 
std::string description () const
 

Static Public Member Functions

static void set_print_errors (bool print_errors)
 
static void set_print_backtrace (bool enabled)
 
static void set_default_stream (std::ostream *ostr)
 

Private Attributes

std::string _message
 

Static Private Attributes

static bool _print_errors = true
 
static bool _print_backtrace = false
 
static std::ostream * _default_ostr = & cerr
 
static LimitedWarning _execinfo_undefined
 

Constructor & Destructor Documentation

◆ Error() [1/2]

Error ( )
inline
464 {}

◆ Error() [2/2]

Error ( const std::string &  message)
3330  {
3331  _message = message_in;
3332  if (_print_errors && _default_ostr){
3333  ostringstream oss;
3334  oss << "fjcore::Error: "<< message_in << endl;
3335  *_default_ostr << oss.str();
3336  _default_ostr->flush();
3337  }
3338 }

◆ ~Error()

virtual ~Error ( )
inlinevirtual
466 {}

Member Function Documentation

◆ description()

std::string description ( ) const
inline
468 {return message();}

◆ message()

std::string message ( ) const
inline
467 {return _message;}

◆ set_default_stream()

static void set_default_stream ( std::ostream *  ostr)
inlinestatic
471  {
472  _default_ostr = ostr;
473  }

◆ set_print_backtrace()

void set_print_backtrace ( bool  enabled)
static
3339  {
3340 #if (!defined(FJCORE_HAVE_EXECINFO_H)) || defined(__FJCORE__)
3341  if (enabled) {
3342  _execinfo_undefined.warn("Error::set_print_backtrace(true) will not work with this build of FastJet");
3343  }
3344 #endif
3345  _print_backtrace = enabled;
3346 }

◆ set_print_errors()

static void set_print_errors ( bool  print_errors)
inlinestatic
469 {_print_errors = print_errors;}

Member Data Documentation

◆ _default_ostr

ostream * _default_ostr = & cerr
staticprivate

the output stream (cerr if not set)

◆ _execinfo_undefined

LimitedWarning _execinfo_undefined
staticprivate

◆ _message

std::string _message
private

error message

◆ _print_backtrace

bool _print_backtrace = false
staticprivate

do we print the backtrace?

◆ _print_errors

bool _print_errors = true
staticprivate

do we print anything?


The documentation for this class was generated from the following files:
LimitedWarning::warn
void warn(const char *warning)
Definition: fjcore.hh:432
Error::_print_errors
static bool _print_errors
do we print anything?
Definition: fjcore.hh:476
Error::_message
std::string _message
error message
Definition: fjcore.hh:475
Error::_default_ostr
static std::ostream * _default_ostr
the output stream (cerr if not set)
Definition: fjcore.hh:478
Error::message
std::string message() const
Definition: fjcore.hh:467
Error::_execinfo_undefined
static LimitedWarning _execinfo_undefined
Definition: fjcore.hh:480
Error::_print_backtrace
static bool _print_backtrace
do we print the backtrace?
Definition: fjcore.hh:477