| The Gaudi Framework v30r0 (c919700c)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
ExceptionSvc Class Reference

Simple implementation of IExceptionSvc abstract interface. More...

`#include <src/ExceptionSvc.h>`

Inheritance diagram for ExceptionSvc:
[legend]
Collaboration diagram for ExceptionSvc:
[legend]

## Public Member Functions
StatusCode | handle (const INamedInterface &o, const GaudiException &e) const override
| Handle caught GaudiExceptions. More...
StatusCode | handle (const INamedInterface &o, const std::exception &e) const override
| Handle caught std::exceptions. More...
StatusCode | handle (const INamedInterface &o) const override
| Handle caught (unknown)exceptions. More...
StatusCode | handleErr (const INamedInterface &o, const StatusCode &s) const override
| Handle errors. More...
StatusCode | initialize () override
| initialize the service More...
| ~ExceptionSvc () override=default
| Destructor. More...
Public Member Functions inherited from extends< Service, IExceptionSvc >
void * | i_cast (const InterfaceID &tid) const override
| Implementation of IInterface::i_cast. More...
StatusCode | queryInterface (const InterfaceID &ti, void **pp) override
| Implementation of IInterface::queryInterface. More...
std::vector< std::string > | getInterfaceNames () const override
| Implementation of IInterface::getInterfaceNames. More...
| ~extends () override=default
| Virtual destructor. More...
Public Member Functions inherited from Service
const std::string & | name () const override
| Retrieve name of the service. More...
StatusCode | configure () override
StatusCode | initialize () override
StatusCode | start () override
StatusCode | stop () override
StatusCode | finalize () override
StatusCode | terminate () override
Gaudi::StateMachine::State | FSMState () const override
Gaudi::StateMachine::State | targetFSMState () const override
StatusCode | reinitialize () override
StatusCode | restart () override
StatusCode | sysInitialize () override
| Initialize Service. More...
StatusCode | sysStart () override
| Initialize Service. More...
StatusCode | sysStop () override
| Initialize Service. More...
StatusCode | sysFinalize () override
| Finalize Service. More...
StatusCode | sysReinitialize () override
| Re-initialize the Service. More...
StatusCode | sysRestart () override
| Re-initialize the Service. More...
| Service (std::string name, ISvcLocator *svcloc)
| Standard Constructor. More...
SmartIF< ISvcLocator > & | serviceLocator () const override
| Retrieve pointer to service locator. More...
StatusCode | setProperties ()
| Method for setting declared properties to the values specified for the job. More...
template<class T >
StatusCode | service (const std::string &name, const T *&psvc, bool createIf=true) const
| Access a service by name, creating it if it doesn't already exist. More...
template<class T >
StatusCode | service (const std::string &name, T *&psvc, bool createIf=true) const
template<typename IFace = IService>
SmartIF< IFace > | service (const std::string &name, bool createIf=true) const
template<class T >
StatusCode | service (const std::string &svcType, const std::string &svcName, T *&psvc) const
| Access a service by name and type, creating it if it doesn't already exist. More...
template<class T >
StatusCode | declareTool (ToolHandle< T > &handle, std::string toolTypeAndName, bool createIf=true)
| Declare used tool. More...
SmartIF< IAuditorSvc > & | auditorSvc () const
| The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
Public Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
| PropertyHolder ()=default
| ~PropertyHolder () override=default
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Details::PropertyBase &prop)
| Declare a property. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, TYPE &value, const std::string &doc="none")
| Helper to wrap a regular data member and use it as a regular property. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, TYPE &value, const std::string &doc="none") const
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, Gaudi::Property< TYPE, VERIFIER, HANDLERS > &prop, const std::string &doc="none")
| Declare a PropertyBase instance setting name and documentation. More...
Gaudi::Details::PropertyBase * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="")
| Declare a remote property. More...
StatusCode | setProperty (const Gaudi::Details::PropertyBase &p) override
| set the property form another property More...
StatusCode | setProperty (const std::string &s) override
| set the property from the formatted string More...
StatusCode | setProperty (const std::string &n, const std::string &v) override
| set the property from name and the value More...
StatusCode | setProperty (const std::string &name, const TYPE &value)
| set the property form the value More...
StatusCode | getProperty (Gaudi::Details::PropertyBase *p) const override
| get the property More...
const Gaudi::Details::PropertyBase & | getProperty (const std::string &name) const override
| get the property by name More...
StatusCode | getProperty (const std::string &n, std::string &v) const override
| convert the property to the string More...
const std::vector< Gaudi::Details::PropertyBase * > & | getProperties () const override
| get all properties More...
bool | hasProperty (const std::string &name) const override
| Return true if we have a property with the given name. More...
| PropertyHolder (const PropertyHolder &)=delete
PropertyHolder & | operator= (const PropertyHolder &)=delete
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, GaudiHandleBase &ref, const std::string &doc="none")
| Specializations for various GaudiHandles. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, GaudiHandleArrayBase &ref, const std::string &doc="none")
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, DataObjectHandleBase &ref, const std::string &doc="none")
Public Member Functions inherited from CommonMessagingBase
virtual | ~CommonMessagingBase ()=default
| Virtual destructor. More...
const SmartIF< IMessageSvc > & | msgSvc () const
| The standard message service. More...
MsgStream & | msgStream () const
| Return an uninitialized MsgStream. More...
MsgStream & | msgStream (const MSG::Level level) const
| Predefined configurable message stream for the efficient printouts. More...
MsgStream & | always () const
| shortcut for the method msgStream(MSG::ALWAYS) More...
MsgStream & | fatal () const
| shortcut for the method msgStream(MSG::FATAL) More...
MsgStream & | err () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | error () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | warning () const
| shortcut for the method msgStream(MSG::WARNING) More...
MsgStream & | info () const
| shortcut for the method msgStream(MSG::INFO) More...
MsgStream & | debug () const
| shortcut for the method msgStream(MSG::DEBUG) More...
MsgStream & | verbose () const
| shortcut for the method msgStream(MSG::VERBOSE) More...
MsgStream & | msg () const
| shortcut for the method msgStream(MSG::INFO) More...
MSG::Level | msgLevel () const
| get the cached level (originally extracted from the embedded MsgStream) More...
MSG::Level | outputLevel () const __attribute__((deprecated))
| Backward compatibility function for getting the output level. More...
bool | msgLevel (MSG::Level lvl) const
| get the output level from the embedded MsgStream More...
Public Member Functions inherited from extend_interfaces< Interfaces... >
| ~extend_interfaces () override=default
| Virtual destructor. More...

## Private Types
enum | Policy { ALL, NONE }
enum | ReturnState { SUCCESS, FAILURE, RECOVERABLE, RETHROW, DEFAULT }

## Private Member Functions
| ExceptionSvc ()=delete
| no default constructor More...
| ExceptionSvc (const ExceptionSvc &)=delete
ExceptionSvc & | operator= (const ExceptionSvc &)=delete
virtual StatusCode | process (const INamedInterface &o) const

## Private Attributes
Policy | m_mode_exc = ALL
Policy | m_mode_err = NONE
std::map< std::string, ReturnState > | m_retCodesExc
std::map< std::string, ReturnState > | m_retCodesErr
Gaudi::Property< std::string > | m_mode_exc_s {this, "Catch", "ALL"}
Gaudi::Property< std::string > | m_mode_err_s {this, "Errors", "NONE"}

## Additional Inherited Members
Public Types inherited from extends< Service, IExceptionSvc >
using | base_class = extends
| Typedef to this class. More...
using | extend_interfaces_base = extend_interfaces< Interfaces... >
| Typedef to the base of this class. More...
Public Types inherited from Service
typedef Gaudi::PluginService::Factory< IService *, const std::string &, ISvcLocator * > | Factory
Public Types inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
using | PropertyHolderImpl = PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
| Typedef used to refer to this class from derived classes, as in. More...
Public Types inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
using | base_class = CommonMessaging
Public Types inherited from extend_interfaces< Interfaces... >
using | ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type
| take union of the ext_iids of all Interfaces... More...
Protected Member Functions inherited from Service
| ~Service () override
| Standard Destructor. More...
int | outputLevel () const
| get the `Service's` output level More...
Protected Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
Gaudi::Details::PropertyBase * | property (const std::string &name) const
Protected Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
MSG::Level | setUpMessaging ()
| Set up local caches. More...
MSG::Level | resetMessaging ()
| Reinitialize internal states. More...
void | updateMsgStreamOutputLevel (int level)
| Update the output level of the cached MsgStream. More...
Protected Attributes inherited from Service
Gaudi::StateMachine::State | m_state = Gaudi::StateMachine::OFFLINE
| Service state. More...
Gaudi::StateMachine::State | m_targetState = Gaudi::StateMachine::OFFLINE
| Service state. More...
Gaudi::Property< int > | m_outputLevel {this, "OutputLevel", MSG::NIL, "output level"}
Gaudi::Property< bool > | m_auditInit {this, "AuditServices", false, "[[deprecated]] unused"}
Gaudi::Property< bool > | m_auditorInitialize {this, "AuditInitialize", false, "trigger auditor on initialize()"}
Gaudi::Property< bool > | m_auditorStart {this, "AuditStart", false, "trigger auditor on start()"}
Gaudi::Property< bool > | m_auditorStop {this, "AuditStop", false, "trigger auditor on stop()"}
Gaudi::Property< bool > | m_auditorFinalize {this, "AuditFinalize", false, "trigger auditor on finalize()"}
Gaudi::Property< bool > | m_auditorReinitialize {this, "AuditReinitialize", false, "trigger auditor on reinitialize()"}
Gaudi::Property< bool > | m_auditorRestart {this, "AuditRestart", false, "trigger auditor on restart()"}
SmartIF< IAuditorSvc > | m_pAuditorSvc
| Auditor Service. More...

## Detailed Description

Simple implementation of IExceptionSvc abstract interface.

Author
  (1) ATLAS collaboration
  (2) modified by Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u

Date
  2007-03-08

Definition at line 19 of file ExceptionSvc.h.

## Member Enumeration Documentation

enum ExceptionSvc::Policy
| private

Enumerator
ALL |
NONE |

Definition at line 50 of file ExceptionSvc.h.

50 { ALL, NONE };
ExceptionSvc::ALL
Definition: ExceptionSvc.h:50
ExceptionSvc::NONE
Definition: ExceptionSvc.h:50

enum ExceptionSvc::ReturnState
| private

Enumerator
SUCCESS |
FAILURE |
RECOVERABLE |
RETHROW |
DEFAULT |

Definition at line 51 of file ExceptionSvc.h.

51 { SUCCESS, FAILURE, RECOVERABLE, RETHROW, DEFAULT };
ExceptionSvc::RETHROW
Definition: ExceptionSvc.h:51
ExceptionSvc::RECOVERABLE
Definition: ExceptionSvc.h:51
ExceptionSvc::FAILURE
Definition: ExceptionSvc.h:51
ExceptionSvc::DEFAULT
Definition: ExceptionSvc.h:51
ExceptionSvc::SUCCESS
Definition: ExceptionSvc.h:51

## Constructor & Destructor Documentation

ExceptionSvc::~ExceptionSvc | ( |  | ) |
| override default

Destructor.

ExceptionSvc::ExceptionSvc | ( |  | ) |
| private delete

no default constructor

ExceptionSvc::ExceptionSvc | ( | const ExceptionSvc & |  | ) |
| private delete

## Member Function Documentation

StatusCode ExceptionSvc::handle | ( | const INamedInterface & | o,
|  | const GaudiException & | e
| ) |  | const
| override

Handle caught GaudiExceptions.

Handle caught exceptions

Definition at line 217 of file ExceptionSvc.cpp.

218 {
219 if ( msgLevel( MSG::DEBUG ) ) debug() << "Handling GaudiException: \"" << exc << "\" for " << alg.name() << endmsg;
220 return process( alg );
221 }
MSG::DEBUG
Definition: IMessageSvc.h:16
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:115
ExceptionSvc::process
virtual StatusCode process(const INamedInterface &o) const
Definition: ExceptionSvc.cpp:174
CommonMessagingBase::msgLevel
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
Definition: CommonMessaging.h:124
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209

StatusCode ExceptionSvc::handle | ( | const INamedInterface & | o,
|  | const std::exception & | e
| ) |  | const
| override

Handle caught std::exceptions.

Handle caught exceptions

Definition at line 210 of file ExceptionSvc.cpp.

211 {
212 if ( msgLevel( MSG::DEBUG ) ) debug() << "Handling std:except: \"" << exc.what() << "\" for " << alg.name() << endmsg;
213 return process( alg );
214 }
MSG::DEBUG
Definition: IMessageSvc.h:16
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:115
ExceptionSvc::process
virtual StatusCode process(const INamedInterface &o) const
Definition: ExceptionSvc.cpp:174
CommonMessagingBase::msgLevel
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
Definition: CommonMessaging.h:124
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209

StatusCode ExceptionSvc::handle | ( | const INamedInterface & | o | ) | const
| override

Handle caught (unknown)exceptions.

Handle caught exceptions

Definition at line 203 of file ExceptionSvc.cpp.

204 {
205 if ( msgLevel( MSG::DEBUG ) ) debug() << "Handling unknown exception for " << alg.name() << endmsg;
206 return process( alg );
207 }
MSG::DEBUG
Definition: IMessageSvc.h:16
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:115
ExceptionSvc::process
virtual StatusCode process(const INamedInterface &o) const
Definition: ExceptionSvc.cpp:174
CommonMessagingBase::msgLevel
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
Definition: CommonMessaging.h:124
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209

StatusCode ExceptionSvc::handleErr | ( | const INamedInterface & | o,
|  | const StatusCode & | s
| ) |  | const
| override

Handle errors.

Handle errors

Definition at line 142 of file ExceptionSvc.cpp.

143 {
144 if ( msgLevel( MSG::DEBUG ) ) debug() << "Handling Error from " << alg.name() << endmsg;
145
146 // is this Alg special?
147 auto i = m_retCodesErr.find( alg.name() );
148 if ( i != m_retCodesErr.end() ) {
149 switch ( i->second ) {
150 case SUCCESS:
151 return StatusCode::SUCCESS;
152 case FAILURE:
153 return StatusCode::FAILURE;
154 case RECOVERABLE:
155 return StatusCode::RECOVERABLE;
156 // should never get here
157 case RETHROW:
158 break;
159 case DEFAULT:
160 break;
161 }
162
163 } else {
164
165 if ( m_mode_err == ALL ) return StatusCode::FAILURE; // turn it into FAILURE
166 assert( m_mode_err == NONE );
167 // don't touch the return code
168 return st;
169 }
170 return StatusCode::FAILURE;
171 }
StatusCode::SUCCESS
Definition: StatusCode.h:29
MSG::DEBUG
Definition: IMessageSvc.h:16
std::map::end
T end(T...args)
ExceptionSvc::ALL
Definition: ExceptionSvc.h:50
ExceptionSvc::RETHROW
Definition: ExceptionSvc.h:51
ExceptionSvc::RECOVERABLE
Definition: ExceptionSvc.h:51
std::map::find
T find(T...args)
ExceptionSvc::FAILURE
Definition: ExceptionSvc.h:51
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:115
ExceptionSvc::m_retCodesErr
std::map< std::string, ReturnState > m_retCodesErr
Definition: ExceptionSvc.h:54
ExceptionSvc::DEFAULT
Definition: ExceptionSvc.h:51
ExceptionSvc::SUCCESS
Definition: ExceptionSvc.h:51
ExceptionSvc::NONE
Definition: ExceptionSvc.h:50
ExceptionSvc::m_mode_err
Policy m_mode_err
Definition: ExceptionSvc.h:53
StatusCode::FAILURE
Definition: StatusCode.h:29
CommonMessagingBase::msgLevel
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
Definition: CommonMessaging.h:124
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
StatusCode::RECOVERABLE
Definition: StatusCode.h:29

StatusCode ExceptionSvc::initialize | ( |  | ) |
| override

initialize the service

Definition at line 30 of file ExceptionSvc.cpp.

31 {
32 StatusCode status = Service::initialize();
33 if ( status.isFailure() ) {
34 return status;
35 }
36
37 string key = m_mode_exc_s.value();
38
39 auto loc = key.find( " " );
40 std::string mode = key.substr( 0, loc );
41
42 toupper( mode );
43
44 if ( mode == "NONE" ) {
45 m_mode_exc = NONE;
46 } else if ( mode == "ALL" ) {
47 m_mode_exc = ALL;
48 } else {
49 error() << "Unknown mode for Exception handling: \"" << mode << "\". Default must be one of \"ALL\" or \"NONE\""
50 << endmsg;
51 m_state = Gaudi::StateMachine::OFFLINE;
52 return StatusCode::FAILURE;
53 }
54
55 if ( loc == string::npos ) {
56 key.clear();
57 } else {
58 key = key.substr( loc + 1 );
59 }
60
61 std::string VAL, TAG;
62
63 static const boost::regex exp{"[[:space:]]*([^[:space:]]+)[[:space:]]*=[[:space:]]*([^[:space:]]+)"};
64 static const auto tok_end = boost::sregex_iterator();
65 for ( auto tok_iter = boost::sregex_iterator( begin( key ), end( key ), exp ); tok_iter != tok_end; ++tok_iter ) {
66 TAG = ( *tok_iter )[1];
67 VAL = ( *tok_iter )[2];
68 toupper( VAL );
69
70 if ( VAL == "SUCCESS" ) {
71 m_retCodesExc[TAG] = SUCCESS;
72 } else if ( VAL == "FAILURE" ) {
73 m_retCodesExc[TAG] = FAILURE;
74 } else if ( VAL == "REVOVERABLE" ) {
75 m_retCodesExc[TAG] = RECOVERABLE;
76 } else if ( VAL == "RETHROW" ) {
77 m_retCodesExc[TAG] = RETHROW;
78 } else if ( VAL == "DEFAULT" ) {
79 m_retCodesExc[TAG] = DEFAULT;
80 } else {
81 error() << "In JobOpts: unknown return code \"" << VAL << "\" for Algorithm " << TAG << std::endl
82 << " Must be one of: DEFAULT, SUCCESS, FAILURE, RECOVERABLE, RETHROW" << endmsg;
83 m_state = Gaudi::StateMachine::OFFLINE;
84 return StatusCode::FAILURE;
85 }
86
87 if ( msgLevel( MSG::DEBUG ) )
88 debug() << "Will catch exceptions thrown by: " << TAG << " -> action: " << VAL << endmsg;
89 }
90
91 // now process errors
92 key = m_mode_err_s.value();
93
94 loc = key.find( " " );
95 mode = key.substr( 0, loc );
96
97 toupper( mode );
98
99 if ( mode == "NONE" ) {
100 m_mode_err = NONE;
101 } else if ( mode == "ALL" ) {
102 m_mode_err = ALL;
103 } else {
104 error() << "Unknown mode for Error handling: \"" << mode << "\". Default must be one of \"ALL\" or \"NONE\""
105 << endmsg;
106 m_state = Gaudi::StateMachine::OFFLINE;
107 return StatusCode::FAILURE;
108 }
109
110 if ( loc == string::npos ) {
111 key.clear();
112 } else {
113 key = key.substr( loc + 1 );
114 }
115
116 for ( auto tok_iter = boost::sregex_iterator( begin( key ), end( key ), exp ); tok_iter != tok_end; ++tok_iter ) {
117 TAG = ( *tok_iter )[1];
118 VAL = ( *tok_iter )[2];
119 toupper( VAL );
120
121 if ( VAL == "SUCCESS" ) {
122 m_retCodesErr[TAG] = SUCCESS;
123 } else if ( VAL == "FAILURE" ) {
124 m_retCodesErr[TAG] = FAILURE;
125 } else if ( VAL == "RECOVERABLE" ) {
126 m_retCodesErr[TAG] = RECOVERABLE;
127 } else {
128 error() << "In JobOpts: unknown return code \"" << VAL << "\" for Algorithm " << TAG << std::endl
129 << " Must be one of: SUCCESS, FAILURE, RECOVERABLE" << endmsg;
130 m_state = Gaudi::StateMachine::OFFLINE;
131 return StatusCode::FAILURE;
132 }
133
134 if ( msgLevel( MSG::DEBUG ) )
135 debug() << "Will process Errors returned by: " << TAG << " -> action: " << VAL << endmsg;
136 }
137 return status;
138 }
Service::initialize
StatusCode initialize() override
Definition: Service.cpp:64
Service::m_state
Gaudi::StateMachine::State m_state
Service state.
Definition: Service.h:160
std::exp
T exp(T...args)
MSG::DEBUG
Definition: IMessageSvc.h:16
std::endl
T endl(T...args)
ExceptionSvc::m_mode_err_s
Gaudi::Property< std::string > m_mode_err_s
Definition: ExceptionSvc.h:57
ExceptionSvc::ALL
Definition: ExceptionSvc.h:50
ExceptionSvc::m_mode_exc
Policy m_mode_exc
Definition: ExceptionSvc.h:53
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:61
begin
auto begin(reverse_wrapper< T > &w)
Definition: reverse.h:58
std::string
STL class.
ExceptionSvc::RETHROW
Definition: ExceptionSvc.h:51
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:106
ExceptionSvc::RECOVERABLE
Definition: ExceptionSvc.h:51
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
end
auto end(reverse_wrapper< T > &w)
Definition: reverse.h:64
std::string::clear
T clear(T...args)
ExceptionSvc::m_retCodesExc
std::map< std::string, ReturnState > m_retCodesExc
Definition: ExceptionSvc.h:54
std::string::find
T find(T...args)
ExceptionSvc::m_mode_exc_s
Gaudi::Property< std::string > m_mode_exc_s
Definition: ExceptionSvc.h:56
ExceptionSvc::FAILURE
Definition: ExceptionSvc.h:51
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:115
ExceptionSvc::m_retCodesErr
std::map< std::string, ReturnState > m_retCodesErr
Definition: ExceptionSvc.h:54
ExceptionSvc::DEFAULT
Definition: ExceptionSvc.h:51
ExceptionSvc::SUCCESS
Definition: ExceptionSvc.h:51
std::string::substr
T substr(T...args)
ExceptionSvc::NONE
Definition: ExceptionSvc.h:50
ExceptionSvc::m_mode_err
Policy m_mode_err
Definition: ExceptionSvc.h:53
StatusCode::FAILURE
Definition: StatusCode.h:29
Gaudi::StateMachine::OFFLINE
Definition: StateMachine.h:15
CommonMessagingBase::msgLevel
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
Definition: CommonMessaging.h:124
toupper
void toupper(std::string &s)
Definition: ExceptionSvc.cpp:26
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209

ExceptionSvc& ExceptionSvc::operator= | ( | const ExceptionSvc & |  | ) |
| private delete

StatusCode ExceptionSvc::process | ( | const INamedInterface & | o | ) | const
| private virtual

Definition at line 174 of file ExceptionSvc.cpp.

175 {
176
177 // is this Alg special?
178 auto i = m_retCodesExc.find( alg.name() );
179 if ( i != m_retCodesExc.end() ) {
180
181 switch ( i->second ) {
182 case DEFAULT:
183 return StatusCode::FAILURE; // there is no default
184 case SUCCESS:
185 return StatusCode::SUCCESS;
186 case FAILURE:
187 return StatusCode::FAILURE;
188 case RECOVERABLE:
189 return StatusCode::RECOVERABLE;
190 case RETHROW:
191 throw;
192 }
193 }
194
195 if ( m_mode_exc == ALL ) {
196 throw;
197 }
198 assert( m_mode_exc == NONE );
199 return StatusCode::FAILURE;
200 }
StatusCode::SUCCESS
Definition: StatusCode.h:29
std::map::end
T end(T...args)
ExceptionSvc::ALL
Definition: ExceptionSvc.h:50
ExceptionSvc::m_mode_exc
Policy m_mode_exc
Definition: ExceptionSvc.h:53
ExceptionSvc::RETHROW
Definition: ExceptionSvc.h:51
ExceptionSvc::RECOVERABLE
Definition: ExceptionSvc.h:51
ExceptionSvc::m_retCodesExc
std::map< std::string, ReturnState > m_retCodesExc
Definition: ExceptionSvc.h:54
std::map::find
T find(T...args)
ExceptionSvc::FAILURE
Definition: ExceptionSvc.h:51
ExceptionSvc::DEFAULT
Definition: ExceptionSvc.h:51
ExceptionSvc::SUCCESS
Definition: ExceptionSvc.h:51
ExceptionSvc::NONE
Definition: ExceptionSvc.h:50
StatusCode::FAILURE
Definition: StatusCode.h:29
StatusCode::RECOVERABLE
Definition: StatusCode.h:29

## Member Data Documentation

Policy ExceptionSvc::m_mode_err = NONE
| private

Definition at line 53 of file ExceptionSvc.h.

Gaudi::Property<std::string> ExceptionSvc::m_mode_err_s {this, "Errors", "NONE"}
| private

Definition at line 57 of file ExceptionSvc.h.

Policy ExceptionSvc::m_mode_exc = ALL
| private

Definition at line 53 of file ExceptionSvc.h.

Gaudi::Property<std::string> ExceptionSvc::m_mode_exc_s {this, "Catch", "ALL"}
| private

Definition at line 56 of file ExceptionSvc.h.

std::map<std::string, ReturnState> ExceptionSvc::m_retCodesErr
| private

Definition at line 54 of file ExceptionSvc.h.

std::map<std::string, ReturnState> ExceptionSvc::m_retCodesExc
| private

Definition at line 54 of file ExceptionSvc.h.

The documentation for this class was generated from the following files:

- GaudiMonitor/src/ExceptionSvc.h
- GaudiMonitor/src/ExceptionSvc.cpp