Gaudi Framework, version v22r2

Home   Generated: Tue May 10 2011

ExceptionSvc.h

Go to the documentation of this file.
00001 // $Id: ExceptionSvc.h,v 1.4 2007/05/24 14:41:22 hmd Exp $
00002 // ============================================================================
00003 // CvS tag $Name:  $, version $Revision: 1.4 $
00004 // ============================================================================
00005 #ifndef GAUDISVC_EXCEPTIONSVC_H
00006 #define GAUDISVC_EXCEPTIONSVC_H
00007 // ============================================================================
00008 // Include files
00009 // ============================================================================
00010 // GaudiKernel
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   // default constructor is disabled
00059   ExceptionSvc () ; 
00060   // copy constructor is disabled
00061   ExceptionSvc ( const ExceptionSvc& ) ; 
00062   // assignment operator is disabled
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 // The END
00081 // ============================================================================
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated at Tue May 10 2011 18:53:57 for Gaudi Framework, version v22r2 by Doxygen version 1.7.2 written by Dimitri van Heesch, © 1997-2004