1 #ifndef GAUDIKERNEL_GAUDIEXCEPTION_H 2 #define GAUDIKERNEL_GAUDIEXCEPTION_H 38 : m_message(
std::move( Message ) ), m_tag(
std::move( Tag ) ),
m_code(
std::move( Code ) )
50 : m_message(
std::move( Message ) )
51 , m_tag(
std::move( Tag ) )
53 , m_previous( Exception.clone() )
64 : m_message(
std::move( Message ) ), m_tag(
std::move( Tag ) ),
m_code(
std::move( Code ) )
72 :
std::exception( Exception )
73 , m_message{Exception.
message()}
74 , m_tag{Exception.tag()}
76 , m_previous{Exception.previous() ? Exception.previous()->clone() :
nullptr}
91 m_message = Exception.
message();
92 m_tag = Exception.
tag();
104 m_message = newMessage;
134 os << tag() <<
" \t " <<
message() <<
"\t StatusCode=" << code();
135 return ( 0 != previous() ) ? previous()->printOut( os <<
std::endl ) : os;
141 os << tag() <<
" \t " <<
message() <<
"\t StatusCode=" << code();
142 return ( 0 != previous() ) ? previous()->printOut( os <<
endmsg ) : os;
163 return ( 0 == pge ) ? ( os <<
" GaudiException* points to NULL!" ) : ( os << *pge );
171 return ( 0 == pge ) ? ( os <<
" GaudiException* points to NULL!" ) : ( os << *pge );
174 #endif // GAUDIKERNEL_GAUDIEXCEPTION_H
virtual const std::string & message() const
error message to be printed
Definition of the MsgStream class used to transmit messages.
Define general base for Gaudi exception.
virtual const StatusCode & setCode(const StatusCode &newStatus)
update the status code for the exception
GaudiException(std::string Message, std::string Tag, StatusCode Code, const GaudiException &Exception)
Constructor (2)
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
GaudiException & operator=(const GaudiException &Exception)
assignment operator
code_t m_code
The status code value.
static bool s_proc
"previous" element in the linked list
virtual const std::string & setMessage(const std::string &newMessage)
update the error message to be printed
std::ostream & operator<<(std::ostream &os, const GaudiException &ge)
overloaded printout to std::ostream
const char * what() const override
method from std::exception
std::string m_tag
error message
virtual const StatusCode & code() const
StatusCode for Exception.
This class is used for returning status codes from appropriate routines.
virtual GaudiException * previous() const
get the previous exception ( "previous" element in the linked list)
virtual GaudiException * clone() const
clone operation
virtual const std::string & tag() const
name tag for the exception, or exception type
GaudiException(std::string Message, std::string Tag, StatusCode Code, const std::exception &Exception)
Constructor (3)
virtual MsgStream & printOut(MsgStream &os) const
Output the exception to the Gaudi MsgStream.
virtual const std::string & setTag(const std::string &newTag)
update name tag
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
std::string message() const
Description (or name) of StatusCode value.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
std::unique_ptr< GaudiException > m_previous
status code for exception
GaudiException(const GaudiException &Exception)
Copy constructor (deep copying!)
GaudiException(std::string Message, std::string Tag, StatusCode Code)
Constructor (1)