Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
ExceptionSvc.h
Go to the documentation of this file.
1 #ifndef GAUDISVC_EXCEPTIONSVC_H
2 #define GAUDISVC_EXCEPTIONSVC_H
3 // ============================================================================
4 // Include files
5 // ============================================================================
6 // GaudiKernel
7 // ============================================================================
10 #include "GaudiKernel/Service.h"
11 // ============================================================================
18 // ============================================================================
19 class ExceptionSvc : public extends<Service, IExceptionSvc> {
20 public:
22  StatusCode handle( const INamedInterface& o, const GaudiException& e ) const override;
23  StatusCode handle( const INamedInterface& o, const std::exception& e ) const override;
25  StatusCode handle( const INamedInterface& o ) const override;
27  StatusCode handleErr( const INamedInterface& o, const StatusCode& s ) const override;
29 public:
31  StatusCode initialize() override;
32 
33 public:
34  using extends::extends;
35 
36 private:
37  // default constructor is disabled
38  ExceptionSvc() = delete;
39  // copy constructor is disabled
40  ExceptionSvc( const ExceptionSvc& ) = delete;
41  // assignment operator is disabled
42  ExceptionSvc& operator=( const ExceptionSvc& ) = delete;
43  // process exceptions
44  virtual StatusCode process( const INamedInterface& o ) const;
45 
46 private:
47  enum Policy { ALL, NONE };
49 
52 
54  Gaudi::Property<std::string> m_mode_err_s{this, "Errors", "NONE"};
55 };
56 
57 // ============================================================================
58 #endif // GAUDISVC_EXCEPTIONSVC_H
Define general base for Gaudi exception.
ExceptionSvc()=delete
no default constructor
ExceptionSvc & operator=(const ExceptionSvc &)=delete
Implementation of property with value of concrete type.
Definition: Property.h:352
Gaudi::Property< std::string > m_mode_err_s
Definition: ExceptionSvc.h:54
Policy m_mode_exc
Definition: ExceptionSvc.h:50
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
Simple implementation of IExceptionSvc abstract interface.
Definition: ExceptionSvc.h:19
StatusCode initialize() override
initialize the service
STL class.
StatusCode handle(const INamedInterface &o, const GaudiException &e) const override
Handle caught GaudiExceptions.
std::map< std::string, ReturnState > m_retCodesExc
Definition: ExceptionSvc.h:51
IInterface compliant class extending IInterface with the name() method.
Gaudi::Property< std::string > m_mode_exc_s
Definition: ExceptionSvc.h:53
std::map< std::string, ReturnState > m_retCodesErr
Definition: ExceptionSvc.h:51
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
StatusCode handleErr(const INamedInterface &o, const StatusCode &s) const override
Handle errors.
string s
Definition: gaudirun.py:312
Policy m_mode_err
Definition: ExceptionSvc.h:50
virtual StatusCode process(const INamedInterface &o) const