| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

TimeException Class Reference

Exception thrown by Gaudi::Time. More...

#include <GaudiKernel/Time.h>

Inheritance diagram for TimeException:

[legend]
Collaboration diagram for TimeException:
[legend]
List of all members.

Public Member Functions

 TimeException (const std::string &Message="unspecified exception", const std::string &Tag="*Gaudi::Time*", const StatusCode &Code=StatusCode::FAILURE)
virtual ~TimeException () throw ()
 Destructor.
virtual TimeExceptionclone () const
 Clone the exception.
virtual const std::string & message () const
 error message to be printed
virtual const std::string & setMessage (const std::string &newMessage)
 update the error message to be printed
virtual const std::string & tag () const
 name tag for the exception, or exception type
virtual const std::string & setTag (const std::string &newTag)
 update name tag
virtual const StatusCodecode () const
 StatusCode for Exception.
virtual const StatusCodesetCode (const StatusCode &newStatus)
 update the status code for the exception
virtual GaudiExceptionprevious () const
 get the previous exception ( "previous" element in the linked list)
virtual std::ostream & printOut (std::ostream &os=std::cerr) const
 methods for overloaded printout to std::ostream& and MsgStream&
virtual MsgStreamprintOut (MsgStream &os) const
 Output the exception to the Gaudi MsgStream.
virtual const char * what () const throw ()
 method from std::exception

Protected Attributes

std::string m_message
std::string m_tag
 error message
StatusCode m_code
 exception tag
GaudiExceptionm_previous
 status code for exception

Detailed Description

Exception thrown by Gaudi::Time.

See also:
GaudiException

Gaudi::Time

Author:
Marco Clemencic
Date:
2005-12-14

Definition at line 21 of file Time.h.


Constructor & Destructor Documentation

TimeException::TimeException ( const std::string &  Message = "unspecified exception",
const std::string &  Tag = "*Gaudi::Time*",
const StatusCode Code = StatusCode::FAILURE 
) [inline]

Definition at line 24 of file Time.h.

00026                                                               :
00027     GaudiException(Message,Tag,Code) {}

virtual TimeException::~TimeException (  )  throw () [inline, virtual]

Destructor.

Definition at line 29 of file Time.h.

00029 {}


Member Function Documentation

virtual TimeException* TimeException::clone (  )  const [inline, virtual]

Clone the exception.

Reimplemented from GaudiException.

Definition at line 31 of file Time.h.

00031 { return new TimeException(*this); }

virtual const std::string& GaudiException::message (  )  const [inline, virtual, inherited]

error message to be printed

Definition at line 113 of file GaudiException.h.

00113 { return m_message; }  

virtual const std::string& GaudiException::setMessage ( const std::string &  newMessage  )  [inline, virtual, inherited]

update the error message to be printed

Definition at line 116 of file GaudiException.h.

00116                                                                         {
00117     m_message = newMessage; return message() ;
00118   }  

virtual const std::string& GaudiException::tag (  )  const [inline, virtual, inherited]

name tag for the exception, or exception type

Definition at line 121 of file GaudiException.h.

00121 { return m_tag; }  

virtual const std::string& GaudiException::setTag ( const std::string &  newTag  )  [inline, virtual, inherited]

update name tag

Definition at line 124 of file GaudiException.h.

00124                                                                         {
00125     m_tag = newTag ; return tag() ;
00126   }

virtual const StatusCode& GaudiException::code (  )  const [inline, virtual, inherited]

StatusCode for Exception.

Definition at line 129 of file GaudiException.h.

00129 { return m_code; }  

virtual const StatusCode& GaudiException::setCode ( const StatusCode newStatus  )  [inline, virtual, inherited]

update the status code for the exception

Definition at line 132 of file GaudiException.h.

00132                                                                            {
00133     m_code = newStatus; return code() ;
00134   } 

virtual GaudiException* GaudiException::previous (  )  const [inline, virtual, inherited]

get the previous exception ( "previous" element in the linked list)

Definition at line 137 of file GaudiException.h.

00137 { return m_previous ; } 

virtual std::ostream& GaudiException::printOut ( std::ostream &  os = std::cerr  )  const [inline, virtual, inherited]

methods for overloaded printout to std::ostream& and MsgStream&

Definition at line 140 of file GaudiException.h.

00140                                                                    {
00141     os << tag() << " \t " << message() ; 
00142     switch( code() ) {
00143       case StatusCode::SUCCESS : os << "\t StatusCode=SUCCESS"    ;  break ; 
00144       case StatusCode::FAILURE : os << "\t StatusCode=FAILURE"    ;  break ; 
00145       default                  : os << "\t StatusCode=" << code() ;  break ; 
00146     }
00147     return ( 0 != previous() ) ? previous()->printOut( os << std::endl ) : os ;
00148   }; 

virtual MsgStream& GaudiException::printOut ( MsgStream os  )  const [inline, virtual, inherited]

Output the exception to the Gaudi MsgStream.

Definition at line 151 of file GaudiException.h.

00151                                                       {
00152     os << tag() << "\t" << message() ; 
00153     switch( code() ) {
00154             case StatusCode::SUCCESS : os << "\t StatusCode=SUCCESS"    ;  break ; 
00155             case StatusCode::FAILURE : os << "\t StatusCode=FAILURE"    ;  break ; 
00156             default                  : os << "\t StatusCode=" << code().getCode() ;  break ; 
00157     }
00158     return ( 0 != previous() ) ? previous()->printOut( os << endreq ) : os ;   
00159   }

virtual const char* GaudiException::what (  )  const throw () [inline, virtual, inherited]

method from std::exception

Definition at line 165 of file GaudiException.h.

00165 { return message().c_str() ; }  


Member Data Documentation

std::string GaudiException::m_message [mutable, protected, inherited]

Definition at line 167 of file GaudiException.h.

std::string GaudiException::m_tag [mutable, protected, inherited]

error message

Definition at line 168 of file GaudiException.h.

StatusCode GaudiException::m_code [mutable, protected, inherited]

exception tag

Definition at line 169 of file GaudiException.h.

GaudiException* GaudiException::m_previous [mutable, protected, inherited]

status code for exception

Definition at line 170 of file GaudiException.h.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 19:57:15 2011 for GaudiKernel by doxygen 1.4.7