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: public extends1<Service, IExceptionSvc> {
00025 friend class SvcFactory<ExceptionSvc> ;
00026 public:
00028 virtual StatusCode handle
00029 ( const INamedInterface& o ,
00030 const GaudiException& e ) const ;
00031
00032 virtual StatusCode handle
00033 ( const INamedInterface& o ,
00034 const std::exception & e ) const ;
00035
00036 virtual StatusCode handle
00037 ( const INamedInterface& o ) const ;
00038
00039 virtual StatusCode handleErr
00040 ( const INamedInterface& o ,
00041 const StatusCode& s ) const ;
00042 public:
00044 virtual StatusCode initialize () ;
00046 virtual StatusCode finalize () ;
00047 public:
00052 ExceptionSvc
00053 ( const std::string& name ,
00054 ISvcLocator* svc ) ;
00056 virtual ~ExceptionSvc();
00057 private:
00058
00059 ExceptionSvc () ;
00060
00061 ExceptionSvc ( const ExceptionSvc& ) ;
00062
00063 ExceptionSvc& operator=( const ExceptionSvc& ) ;
00064 private:
00065
00066 enum Policy { ALL, NONE };
00067 enum ReturnState { SUCCESS, FAILURE, RECOVERABLE, RETHROW, DEFAULT };
00068
00069 Policy m_mode_exc, m_mode_err;
00070 StringProperty m_mode_exc_s, m_mode_err_s;
00071 std::map<std::string,ReturnState> m_retCodesExc, m_retCodesErr;
00072
00073 mutable MsgStream m_log;
00074
00075 };
00076
00077
00078 #endif // GAUDISVC_EXCEPTIONSVC_H
00079
00080
00081