Gaudi Framework, version v23r4

Home   Generated: Mon Sep 17 2012

ExceptionSvc.h

Go to the documentation of this file.
00001 #ifndef GAUDISVC_EXCEPTIONSVC_H
00002 #define GAUDISVC_EXCEPTIONSVC_H
00003 // ============================================================================
00004 // Include files
00005 // ============================================================================
00006 // GaudiKernel
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   // default constructor is disabled
00055   ExceptionSvc () ; 
00056   // copy constructor is disabled
00057   ExceptionSvc ( const ExceptionSvc& ) ; 
00058   // assignment operator is disabled
00059   ExceptionSvc& operator=( const ExceptionSvc& ) ; 
00060   // process exceptions
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 // The END
00079 // ============================================================================
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated at Mon Sep 17 2012 13:49:35 for Gaudi Framework, version v23r4 by Doxygen version 1.7.2 written by Dimitri van Heesch, © 1997-2004