19 inline std::string captureBacktrace(
const StatusCode& code ) {
20 std::string backtrace;
48 :
std::exception( Exception )
61 m_tag = Exception.tag();
64 m_previous.reset( Exception.previous() ? Exception.previous()->clone() :
nullptr );
70 if ( !
backTrace().empty() ) os << std::endl <<
"Exception stack trace\n" <<
backTrace();
83 return ( 0 == pge ) ? ( os <<
" GaudiException* points to NULL!" ) : ( os << *pge );
89 return ( 0 == pge ) ? ( os <<
" GaudiException* points to NULL!" ) : ( os << *pge );
std::ostream & operator<<(std::ostream &os, const GaudiException &ge)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
virtual const std::string & message() const
error message to be printed
static bool s_proc
"previous" element in the linked list
virtual const StatusCode & code() const
StatusCode for Exception.
GaudiException(std::string Message, std::string Tag, StatusCode Code)
Constructor (1)
virtual std::ostream & printOut(std::ostream &os=std::cerr) const
methods for overloaded printout to std::ostream& and MsgStream&
virtual ~GaudiException()
destructor (perform the deletion of "previous" field!)
StatusCode m_code
exception tag
virtual GaudiException * clone() const
clone operation
std::unique_ptr< GaudiException > m_previous
stack trace at instantiation
std::string m_tag
error message
std::string m_backTrace
status code for exception
GaudiException & operator=(const GaudiException &Exception)
assignment operator
virtual const std::string & backTrace() const
return the stack trace at instantiation
virtual GaudiException * previous() const
get the previous exception ( "previous" element in the linked list)
virtual const std::string & tag() const
name tag for the exception, or exception type
Definition of the MsgStream class used to transmit messages.
This class is used for returning status codes from appropriate routines.
GAUDI_API int backTrace(void **addresses, const int depth)
GAUDI_API bool isEnvSet(const char *var)
Check if an environment variable is set or not.
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.