ExceptionSvc.h
Go to the documentation of this file.00001
00002
00003
00004
00005 #ifndef GAUDISVC_EXCEPTIONSVC_H
00006 #define GAUDISVC_EXCEPTIONSVC_H
00007
00008
00009
00010
00011
00012 #include "GaudiKernel/IExceptionSvc.h"
00013 #include "GaudiKernel/Service.h"
00014 #include "GaudiKernel/SvcFactory.h"
00015 #include "GaudiKernel/MsgStream.h"
00016
00023
00024 class ExceptionSvc
00025 : public Service
00026 , public virtual IExceptionSvc
00027 {
00028 friend class SvcFactory<ExceptionSvc> ;
00029 public:
00031 virtual StatusCode handle
00032 ( const INamedInterface& o ,
00033 const GaudiException& e ) const ;
00034
00035 virtual StatusCode handle
00036 ( const INamedInterface& o ,
00037 const std::exception & e ) const ;
00038
00039 virtual StatusCode handle
00040 ( const INamedInterface& o ) const ;
00041
00042 virtual StatusCode handleErr
00043 ( const INamedInterface& o ,
00044 const StatusCode& s ) const ;
00045 public:
00047 virtual StatusCode initialize () ;
00049 virtual StatusCode finalize () ;
00050 public:
00054 virtual StatusCode queryInterface
00055 ( const InterfaceID& iid ,
00056 void** ppvi ) ;
00057 public:
00062 ExceptionSvc
00063 ( const std::string& name ,
00064 ISvcLocator* svc ) ;
00066 virtual ~ExceptionSvc();
00067 private:
00068
00069 ExceptionSvc () ;
00070
00071 ExceptionSvc ( const ExceptionSvc& ) ;
00072
00073 ExceptionSvc& operator=( const ExceptionSvc& ) ;
00074 private:
00075
00076 enum Policy { ALL, NONE };
00077 enum ReturnState { SUCCESS, FAILURE, RECOVERABLE, RETHROW, DEFAULT };
00078
00079 Policy m_mode_exc, m_mode_err;
00080 StringProperty m_mode_exc_s, m_mode_err_s;
00081 std::map<std::string,ReturnState> m_retCodesExc, m_retCodesErr;
00082
00083 mutable MsgStream m_log;
00084
00085 };
00086
00087
00088 #endif // GAUDISVC_EXCEPTIONSVC_H
00089
00090
00091