All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ExceptionSvc Class Reference

Simple implementation of IExceptionSvc abstract interface. More...

#include <src/ExceptionSvc.h>

Inheritance diagram for ExceptionSvc:
Collaboration diagram for ExceptionSvc:

Public Member Functions

virtual StatusCode handle (const INamedInterface &o, const GaudiException &e) const
 Handle caught GaudiExceptions. More...
 
virtual StatusCode handle (const INamedInterface &o, const std::exception &e) const
 Handle caught std::exceptions. More...
 
virtual StatusCode handle (const INamedInterface &o) const
 Handle caught (unknown)exceptions. More...
 
virtual StatusCode handleErr (const INamedInterface &o, const StatusCode &s) const
 Handle errors. More...
 
virtual StatusCode initialize ()
 initialize the service More...
 
virtual StatusCode finalize ()
 finalize the service More...
 
 ExceptionSvc (const std::string &name, ISvcLocator *svc)
 standard constructor More...
 
virtual ~ExceptionSvc ()
 Destructor. More...
 
- Public Member Functions inherited from extends1< Service, IExceptionSvc >
 extends1 (A1 a1, A2 a2, A3 a3)
 Templated constructor with 3 arguments. More...
 
 extends1 (A1 a1, A2 a2)
 Templated constructor with 2 arguments. More...
 
 extends1 (A1 a1)
 Templated constructor with 1 argument. More...
 
 extends1 ()
 Default constructor. More...
 
virtual void * i_cast (const InterfaceID &tid) const
 Implementation of IInterface::i_cast. More...
 
virtual StatusCode queryInterface (const InterfaceID &ti, void **pp)
 Implementation of IInterface::queryInterface. More...
 
virtual std::vector< std::string > getInterfaceNames () const
 Implementation of IInterface::getInterfaceNames. More...
 
virtual ~extends1 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from Service
virtual unsigned long release ()
 Release Interface instance. More...
 
virtual const std::string & name () const
 Retrieve name of the service. More...
 
virtual StatusCode configure ()
 Configuration (from OFFLINE to CONFIGURED). More...
 
virtual StatusCode start ()
 Start (from INITIALIZED to RUNNING). More...
 
virtual StatusCode stop ()
 Stop (from RUNNING to INITIALIZED). More...
 
virtual StatusCode terminate ()
 Initialization (from CONFIGURED to OFFLINE). More...
 
virtual Gaudi::StateMachine::State FSMState () const
 Get the current state. More...
 
virtual Gaudi::StateMachine::State targetFSMState () const
 When we are in the middle of a transition, get the state where the transition is leading us. More...
 
virtual StatusCode reinitialize ()
 Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED). More...
 
virtual StatusCode restart ()
 Initialization (from RUNNING to RUNNING, via INITIALIZED). More...
 
virtual StatusCode sysInitialize ()
 Initialize Service. More...
 
virtual StatusCode sysStart ()
 Initialize Service. More...
 
virtual StatusCode sysStop ()
 Initialize Service. More...
 
virtual StatusCode sysFinalize ()
 Finalize Service. More...
 
virtual StatusCode sysReinitialize ()
 Re-initialize the Service. More...
 
virtual StatusCode sysRestart ()
 Re-initialize the Service. More...
 
virtual StatusCode setProperty (const Property &p)
 Set the property by property. More...
 
virtual StatusCode setProperty (const std::string &s)
 Set the property by string. More...
 
virtual StatusCode setProperty (const std::string &n, const std::string &v)
 Set the property by std::string. More...
 
virtual StatusCode getProperty (Property *p) const
 Get the property by property. More...
 
virtual const PropertygetProperty (const std::string &name) const
 Get the property by name. More...
 
virtual StatusCode getProperty (const std::string &n, std::string &v) const
 Get the property by std::string. More...
 
virtual const std::vector
< Property * > & 
getProperties () const
 Get list of properties. More...
 
template<class TYPE >
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
 Service (const std::string &name, ISvcLocator *svcloc)
 Standard Constructor. More...
 
SmartIF< ISvcLocator > & serviceLocator () const
 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<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 >
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
 Declare the named property. More...
 
PropertydeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
 Declare remote named properties. More...
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
 
- Public Member Functions inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
 CommonMessaging (const A1 &a1, const A2 &a2, const A3 &a3)
 Templated constructor with 3 arguments. More...
 
 CommonMessaging (const A1 &a1, const A2 &a2)
 Templated constructor with 2 arguments. More...
 
 CommonMessaging (const A1 &a1)
 Templated constructor with 1 argument. More...
 
 CommonMessaging ()
 Default constructor. More...
 
virtual ~CommonMessaging ()
 Virtual destructor. More...
 
SmartIF< IMessageSvc > & msgSvc () const
 The standard message service. More...
 
MsgStreammsgStream () const
 Return an uninitialized MsgStream. More...
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts. More...
 
MsgStreamalways () const
 shortcut for the method msgStream(MSG::ALWAYS) More...
 
MsgStreamfatal () const
 shortcut for the method msgStream(MSG::FATAL) More...
 
MsgStreamerr () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamerror () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamwarning () const
 shortcut for the method msgStream(MSG::WARNING) More...
 
MsgStreaminfo () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MsgStreamdebug () const
 shortcut for the method msgStream(MSG::DEBUG) More...
 
MsgStreamverbose () const
 shortcut for the method msgStream(MSG::VERBOSE) More...
 
MsgStreammsg () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MSG::Level msgLevel () const
 get the output level from the embedded MsgStream More...
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream More...
 
- Public Member Functions inherited from extend_interfaces3< IService, IProperty, IStateful >
virtual ~extend_interfaces3 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IService
 DeclareInterfaceID (IService, 3, 0)
 InterfaceID. More...
 
virtual ~IService ()
 virtual destructor More...
 
- Public Member Functions inherited from INamedInterface
 DeclareInterfaceID (INamedInterface, 1, 0)
 InterfaceID. More...
 
virtual ~INamedInterface ()
 Virtual destructor (always needed for abstract classes). More...
 
- Public Member Functions inherited from IInterface
virtual unsigned long addRef ()=0
 Increment the reference count of Interface instance. More...
 
virtual unsigned long refCount () const =0
 Current reference count. More...
 
virtual ~IInterface ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IProperty
 DeclareInterfaceID (IProperty, 2, 0)
 InterfaceID. More...
 
- Public Member Functions inherited from IStateful
 DeclareInterfaceID (IStateful, 1, 0)
 InterfaceID. More...
 
virtual ~IStateful ()
 
- Public Member Functions inherited from extend_interfaces1< IExceptionSvc >
virtual ~extend_interfaces1 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IExceptionSvc
 DeclareInterfaceID (IExceptionSvc, 3, 0)
 InterfaceID. More...
 

Private Types

enum  Policy { ALL, NONE }
 
enum  ReturnState {
  SUCCESS, FAILURE, RECOVERABLE, RETHROW,
  DEFAULT
}
 

Private Member Functions

 ExceptionSvc ()
 no default constructor More...
 
 ExceptionSvc (const ExceptionSvc &)
 no copy constructor More...
 
ExceptionSvcoperator= (const ExceptionSvc &)
 no assignement More...
 
virtual StatusCode process (const INamedInterface &o) const
 

Private Attributes

Policy m_mode_exc
 
Policy m_mode_err
 
StringProperty m_mode_exc_s
 
StringProperty m_mode_err_s
 
std::map< std::string,
ReturnState
m_retCodesExc
 
std::map< std::string,
ReturnState
m_retCodesErr
 
MsgStream m_log
 

Additional Inherited Members

- Public Types inherited from extends1< Service, IExceptionSvc >
typedef extends1 base_class
 Typedef to this class. More...
 
typedef extend_interfaces1
< IExceptionSvc
extend_interfaces_base
 Typedef to the base of this class. More...
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces. More...
 
- Public Types inherited from Service
typedef
Gaudi::PluginService::Factory
< IService *, const
std::string &, ISvcLocator * > 
Factory
 
- Public Types inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
typedef CommonMessaging base_class
 
- Public Types inherited from implements3< IService, IProperty, IStateful >
typedef implements3 base_class
 Typedef to this class. More...
 
typedef extend_interfaces3
< IService, IProperty,
IStateful
extend_interfaces_base
 Typedef to the base of this class. More...
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces. More...
 
- Public Types inherited from extend_interfaces3< IService, IProperty, IStateful >
typedef mpl::fold< typename
IService::iid::iids::type,
typename mpl::fold< typename
IProperty::iid::iids::type,
typename
IStateful::iid::iids::type,
mpl::insert< mpl::_1, mpl::_2 >
>::type, mpl::insert< mpl::_1,
mpl::_2 > >::type 
ext_iids
 MPL set of interfaces extended by this one. More...
 
- Public Types inherited from IInterface
enum  Status { SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR }
 Return status. More...
 
typedef Gaudi::InterfaceId
< IInterface, 0, 0 > 
iid
 Interface ID. More...
 
typedef mpl::set1< iidext_iids
 Extra interfaces. More...
 
- Public Types inherited from extend_interfaces1< IExceptionSvc >
typedef
IExceptionSvc::iid::iids::type 
ext_iids
 MPL set of interfaces extended by this one. More...
 
- Static Public Member Functions inherited from IInterface
static const InterfaceIDinterfaceID ()
 Return an instance of InterfaceID identifying the interface. More...
 
- Protected Member Functions inherited from Service
virtual ~Service ()
 Standard Destructor. More...
 
int outputLevel () const
 get the Service's output level More...
 
- Protected Member Functions inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream. More...
 
- Protected Member Functions inherited from IExceptionSvc
virtual ~IExceptionSvc ()
 virtual and protected destructor More...
 
- Protected Attributes inherited from Service
IntegerProperty m_outputLevel
 Service output level. More...
 
Gaudi::StateMachine::State m_state
 Service state. More...
 
Gaudi::StateMachine::State m_targetState
 Service state. More...
 
- Protected Attributes inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
SmartIF< IMessageSvcm_msgsvc
 Pointer to the message service;. More...
 
std::auto_ptr< MsgStreamm_msgStream
 The predefined message stream. More...
 
bool m_streamWithService
 Flag to create a new MsgStream if it was created without the message 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 62 of file ExceptionSvc.h.

Enumerator
SUCCESS 
FAILURE 
RECOVERABLE 
RETHROW 
DEFAULT 

Definition at line 63 of file ExceptionSvc.h.

Constructor & Destructor Documentation

ExceptionSvc::ExceptionSvc ( const std::string &  name,
ISvcLocator svc 
)

standard constructor

Parameters
nameservice instance name
pSvcpointer to Service Locator

Definition at line 35 of file ExceptionSvc.cpp.

36  : base_class( name, svc )
37  , m_mode_exc ( ALL ), m_mode_err( NONE )
38  , m_log(msgSvc(), name )
39 {
40  // for exceptions
41  declareProperty( "Catch" , m_mode_exc_s="ALL" ) ;
42 
43  // for return codes
44  declareProperty( "Errors" , m_mode_err_s="NONE" ) ;
45 }
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
extends1 base_class
Typedef to this class.
Definition: extends.h:12
Policy m_mode_exc
Definition: ExceptionSvc.h:65
StringProperty m_mode_err_s
Definition: ExceptionSvc.h:66
StringProperty m_mode_exc_s
Definition: ExceptionSvc.h:66
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
Policy m_mode_err
Definition: ExceptionSvc.h:65
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
Definition: Service.h:211
MsgStream m_log
Definition: ExceptionSvc.h:69
ExceptionSvc::~ExceptionSvc ( )
virtual

Destructor.

Definition at line 49 of file ExceptionSvc.cpp.

49  {
50 
51 }
ExceptionSvc::ExceptionSvc ( )
private

no default constructor

ExceptionSvc::ExceptionSvc ( const ExceptionSvc )
private

no copy constructor

Member Function Documentation

StatusCode ExceptionSvc::finalize ( )
virtual

finalize the service

Reimplemented from Service.

Definition at line 198 of file ExceptionSvc.cpp.

198  {
199  StatusCode status = Service::finalize();
200 
201  return status;
202 }
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual StatusCode finalize()
Finalize (from INITIALIZED to CONFIGURED).
Definition: Service.cpp:199
StatusCode ExceptionSvc::handle ( const INamedInterface o,
const GaudiException e 
) const
virtual

Handle caught GaudiExceptions.

Handle caught exceptions

Implements IExceptionSvc.

Definition at line 307 of file ExceptionSvc.cpp.

309 {
310  m_log << MSG::DEBUG << "Handling GaudiException: \"" << exc << "\" for "
311  << alg.name() << endmsg;
312 
313  return process(alg);
314 
315 }
virtual StatusCode process(const INamedInterface &o) const
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
MsgStream m_log
Definition: ExceptionSvc.h:69
StatusCode ExceptionSvc::handle ( const INamedInterface o,
const std::exception &  e 
) const
virtual

Handle caught std::exceptions.

Handle caught exceptions

Implements IExceptionSvc.

Definition at line 295 of file ExceptionSvc.cpp.

297 {
298  m_log << MSG::DEBUG << "Handling std:except: \"" << exc.what() << "\" for "
299  << alg.name() << endmsg;
300 
301  return process(alg) ;
302 
303 }
virtual StatusCode process(const INamedInterface &o) const
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
MsgStream m_log
Definition: ExceptionSvc.h:69
StatusCode ExceptionSvc::handle ( const INamedInterface o) const
virtual

Handle caught (unknown)exceptions.

Handle caught exceptions

Implements IExceptionSvc.

Definition at line 285 of file ExceptionSvc.cpp.

286 {
287  m_log << MSG::DEBUG << "Handling unknown exception for " << alg.name()
288  << endmsg;
289 
290  return process(alg);
291 }
virtual StatusCode process(const INamedInterface &o) const
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
MsgStream m_log
Definition: ExceptionSvc.h:69
StatusCode ExceptionSvc::handleErr ( const INamedInterface o,
const StatusCode s 
) const
virtual

Handle errors.

Handle errors

Implements IExceptionSvc.

Definition at line 207 of file ExceptionSvc.cpp.

209 {
210  m_log << MSG::DEBUG << "Handling Error from " << alg.name() << endmsg;
211 
212  // is this Alg special?
213  if (m_retCodesErr.find(alg.name()) != m_retCodesErr.end()) {
214  ReturnState iret = m_retCodesErr.find(alg.name())->second;
215 
216  switch ( iret ) {
217  case SUCCESS:
218  return StatusCode::SUCCESS;
219  case FAILURE:
220  return StatusCode::FAILURE;
221  case RECOVERABLE:
223  case RETHROW:
224  // should never get here
225  break;
226  case DEFAULT:
227  // should never get here
228  break;
229  }
230 
231  } else {
232 
233  if (m_mode_err == ALL) {
234  // turn it into a FAILURE
235  return StatusCode::FAILURE;
236 
237  } else {
238  assert (m_mode_err == NONE );
239  // don't touch the return code
240  return st;
241  }
242  }
243 
244  return StatusCode::FAILURE;
245 }
std::map< std::string, ReturnState > m_retCodesErr
Definition: ExceptionSvc.h:67
Policy m_mode_err
Definition: ExceptionSvc.h:65
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
MsgStream m_log
Definition: ExceptionSvc.h:69
StatusCode ExceptionSvc::initialize ( )
virtual

initialize the service

Reimplemented from Service.

Definition at line 57 of file ExceptionSvc.cpp.

57  {
60 
61  if ( status.isFailure() ) { return status ; } // RETURN
62 
63  string key = m_mode_exc_s.value();
64 
65  string::size_type loc = key.find(" ");
66  std::string mode;
67  if (loc == std::string::npos) {
68  mode = key;
69  } else {
70  mode = key.substr(0,loc);
71  }
72 
73  toupper(mode);
74 
75  if (mode == "NONE") {
76  m_mode_exc = NONE;
77  } else if (mode == "ALL") {
78  m_mode_exc = ALL;
79  } else {
80  m_log << MSG::ERROR << "Unknown mode for Exception handling: \"" << mode
81  << "\". Default must be one of \"ALL\" or \"NONE\"" << endmsg;
83  return StatusCode::FAILURE;
84  }
85 
86  if (loc == string::npos) {
87  key = "";
88  } else {
89  key = key.substr(loc+1,key.length());
90  }
91 
92  Tokenizer tok(true);
93  std::string val,VAL,TAG;
94 
95  tok.analyse( key, " ", "", "", "=", "", "");
96 
97  for ( Tokenizer::Items::iterator i = tok.items().begin();
98  i != tok.items().end(); i++) {
99  const std::string& tag = (*i).tag();
100  TAG = tag;
101 
102  val = (*i).value();
103  VAL = val;
104  toupper(VAL);
105 
106  if (VAL == "SUCCESS") {
107  m_retCodesExc[TAG] = SUCCESS;
108  } else if ( VAL == "FAILURE" ) {
109  m_retCodesExc[TAG] = FAILURE;
110  } else if ( VAL == "REVOVERABLE" ) {
111  m_retCodesExc[TAG] = RECOVERABLE;
112  } else if ( VAL == "RETHROW" ) {
113  m_retCodesExc[TAG] = RETHROW;
114  } else if ( VAL == "DEFAULT" ) {
115  m_retCodesExc[TAG] = DEFAULT;
116  } else {
117  m_log << MSG::ERROR << "In JobOpts: unknown return code \"" << VAL
118  << "\" for Algorithm " << TAG << std::endl
119  << " Must be one of: DEFAULT, SUCCESS, FAILURE, RECOVERABLE, RETHROW"
120  << endmsg;
122  return StatusCode::FAILURE;
123  }
124 
125  m_log << MSG::DEBUG << "Will catch exceptions thrown by: " << TAG
126  << " -> action: " << VAL << endmsg;
127 
128  }
129 
130  // now process errors
131 
132  key = m_mode_err_s.value();
133 
134  loc = key.find(" ");
135  if (loc == std::string::npos) {
136  mode = key;
137  } else {
138  mode = key.substr(0,loc);
139  }
140 
141  toupper(mode);
142 
143  if (mode == "NONE") {
144  m_mode_err = NONE;
145  } else if (mode == "ALL") {
146  m_mode_err = ALL;
147  } else {
148  m_log << MSG::ERROR << "Unknown mode for Error handling: \"" << mode
149  << "\". Default must be one of \"ALL\" or \"NONE\"" << endmsg;
151  return StatusCode::FAILURE;
152  }
153 
154  if (loc == string::npos) {
155  key = "";
156  } else {
157  key = key.substr(loc+1,key.length());
158  }
159 
160  Tokenizer tok2(true);
161  tok2.analyse( key, " ", "", "", "=", "", "");
162 
163  for ( Tokenizer::Items::iterator i = tok2.items().begin();
164  i != tok2.items().end(); i++) {
165  const std::string& tag = (*i).tag();
166  TAG = tag;
167 
168  val = (*i).value();
169  VAL = val;
170  toupper(VAL);
171 
172  if (VAL == "SUCCESS") {
173  m_retCodesErr[TAG] = SUCCESS;
174  } else if ( VAL == "FAILURE" ) {
175  m_retCodesErr[TAG] = FAILURE;
176  } else if ( VAL == "RECOVERABLE" ) {
177  m_retCodesErr[TAG] = RECOVERABLE;
178  } else {
179  m_log << MSG::ERROR << "In JobOpts: unknown return code \"" << VAL
180  << "\" for Algorithm " << TAG << std::endl
181  << " Must be one of: SUCCESS, FAILURE, RECOVERABLE"
182  << endmsg;
184  return StatusCode::FAILURE;
185  }
186 
187  m_log << MSG::DEBUG << "Will process Errors returned by: " << TAG
188  << " -> action: " << VAL << endmsg;
189 
190  }
191 
192  return status;
193 }
IntegerProperty m_outputLevel
Service output level.
Definition: Service.h:243
Gaudi::StateMachine::State m_state
Service state.
Definition: Service.h:245
std::map< std::string, ReturnState > m_retCodesErr
Definition: ExceptionSvc.h:67
Policy m_mode_exc
Definition: ExceptionSvc.h:65
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
StringProperty m_mode_err_s
Definition: ExceptionSvc.h:66
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
STL Include files.
Definition: Tokenizer.h:24
StringProperty m_mode_exc_s
Definition: ExceptionSvc.h:66
const TYPE & value() const
explicit conversion
Definition: Property.h:355
std::map< std::string, ReturnState > m_retCodesExc
Definition: ExceptionSvc.h:67
virtual StatusCode initialize()
Initialization (from CONFIGURED to INITIALIZED).
Definition: Service.cpp:74
void setLevel(int level)
Update outputlevel.
Definition: MsgStream.h:106
Policy m_mode_err
Definition: ExceptionSvc.h:65
list i
Definition: ana.py:128
void toupper(std::string &s)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
MsgStream m_log
Definition: ExceptionSvc.h:69
ExceptionSvc& ExceptionSvc::operator= ( const ExceptionSvc )
private

no assignement

StatusCode ExceptionSvc::process ( const INamedInterface o) const
privatevirtual

Definition at line 249 of file ExceptionSvc.cpp.

250 {
251 
252  // is this Alg special?
253  if (m_retCodesExc.find(alg.name()) != m_retCodesExc.end()) {
254  ReturnState iret = m_retCodesExc.find(alg.name())->second;
255 
256  switch ( iret ) {
257  case DEFAULT:
258  // there is no default
259  return StatusCode::FAILURE;
260  case SUCCESS:
261  return StatusCode::SUCCESS;
262  case FAILURE:
263  return StatusCode::FAILURE;
264  case RECOVERABLE:
266  case RETHROW:
267  throw;
268  }
269 
270  } else {
271 
272  if (m_mode_exc == ALL) {
273  throw;
274  } else {
275  assert (m_mode_exc == NONE);
276  return StatusCode::FAILURE;
277  }
278  }
279 
280  return StatusCode::FAILURE;
281 }
Policy m_mode_exc
Definition: ExceptionSvc.h:65
std::map< std::string, ReturnState > m_retCodesExc
Definition: ExceptionSvc.h:67

Member Data Documentation

MsgStream ExceptionSvc::m_log
mutableprivate

Definition at line 69 of file ExceptionSvc.h.

Policy ExceptionSvc::m_mode_err
private

Definition at line 65 of file ExceptionSvc.h.

StringProperty ExceptionSvc::m_mode_err_s
private

Definition at line 66 of file ExceptionSvc.h.

Policy ExceptionSvc::m_mode_exc
private

Definition at line 65 of file ExceptionSvc.h.

StringProperty ExceptionSvc::m_mode_exc_s
private

Definition at line 66 of file ExceptionSvc.h.

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

Definition at line 67 of file ExceptionSvc.h.

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

Definition at line 67 of file ExceptionSvc.h.


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