Go to the documentation of this file.00001 #ifndef GAUDISVC_EXCEPTIONSVC_H
00002 #define GAUDISVC_EXCEPTIONSVC_H
00003
00004
00005
00006
00007
00008 #include "GaudiKernel/IExceptionSvc.h"
00009 #include "GaudiKernel/Service.h"
00010 #include "GaudiKernel/SvcFactory.h"
00011 #include "GaudiKernel/MsgStream.h"
00012
00019
00020 class ExceptionSvc: public extends1<Service, IExceptionSvc> {
00021 friend class SvcFactory<ExceptionSvc> ;
00022 public:
00024 virtual StatusCode handle
00025 ( const INamedInterface& o ,
00026 const GaudiException& e ) const ;
00027
00028 virtual StatusCode handle
00029 ( const INamedInterface& o ,
00030 const std::exception & e ) const ;
00031
00032 virtual StatusCode handle
00033 ( const INamedInterface& o ) const ;
00034
00035 virtual StatusCode handleErr
00036 ( const INamedInterface& o ,
00037 const StatusCode& s ) const ;
00038 public:
00040 virtual StatusCode initialize () ;
00042 virtual StatusCode finalize () ;
00043 public:
00048 ExceptionSvc
00049 ( const std::string& name ,
00050 ISvcLocator* svc ) ;
00052 virtual ~ExceptionSvc();
00053 private:
00054
00055 ExceptionSvc () ;
00056
00057 ExceptionSvc ( const ExceptionSvc& ) ;
00058
00059 ExceptionSvc& operator=( const ExceptionSvc& ) ;
00060
00061 virtual StatusCode process ( const INamedInterface& o ) const ;
00062 private:
00063
00064 enum Policy { ALL, NONE };
00065 enum ReturnState { SUCCESS, FAILURE, RECOVERABLE, RETHROW, DEFAULT };
00066
00067 Policy m_mode_exc, m_mode_err;
00068 StringProperty m_mode_exc_s, m_mode_err_s;
00069 std::map<std::string,ReturnState> m_retCodesExc, m_retCodesErr;
00070
00071 mutable MsgStream m_log;
00072
00073 };
00074
00075
00076 #endif // GAUDISVC_EXCEPTIONSVC_H
00077
00078
00079