![]() |
The Gaudi Framework
v25r3
|
The most simple guard - it execute the certain code withing typical "try {} catch" clause, used in Auditor, Algorithm, AlgTool, etc. More...
#include <GaudiKernel/Guards.h>

Public Member Functions | |
| template<class OBJECT , class FUNCTION > | |
| ExceptionGuard (OBJECT obj, FUNCTION fun, MsgStream &log, IExceptionSvc *svc=0) | |
| ~ExceptionGuard () | |
| destructor More... | |
| const StatusCode & | code () const |
| the result of function evaluation More... | |
| operator const StatusCode & () const | |
| cast operator, useful for the implicit conversions More... | |
Protected Member Functions | |
| void | handle (const GaudiException &e, MsgStream &s) |
| local handler of GaudiException More... | |
| void | handle (const std::exception &e, MsgStream &s) |
| local handler of std::exception More... | |
| void | handle (MsgStream &s) |
| local handler of UNKNOWN exceptions More... | |
Private Member Functions | |
| ExceptionGuard () | |
| default constructor is disabled More... | |
| ExceptionGuard (const ExceptionGuard &) | |
| no copy More... | |
| ExceptionGuard & | operator= (const ExceptionGuard &) |
| no assignement More... | |
Private Attributes | |
| StatusCode | m_sc |
| status code : result of function evaluation More... | |
The most simple guard - it execute the certain code withing typical "try {} catch" clause, used in Auditor, Algorithm, AlgTool, etc.
. classes
The usage is fairly trivial:
The utility could be reused for member-function, regular functions, etc.. It could be easily combined with STL-idioms Essentially it required only the semantical validity of the expression "StatusCode sc = fun(obj)"
|
inline |
< execute the functor
Definition at line 118 of file Guards.h.
| Gaudi::Guards::ExceptionGuard::~ExceptionGuard | ( | ) |
destructor
Definition at line 61 of file Guards.cpp.
|
private |
default constructor is disabled
|
private |
no copy
|
inline |
the result of function evaluation
Definition at line 154 of file Guards.h.
|
protected |
local handler of GaudiException
Definition at line 26 of file Guards.cpp.
|
protected |
local handler of std::exception
Definition at line 41 of file Guards.cpp.
|
protected |
local handler of UNKNOWN exceptions
Definition at line 53 of file Guards.cpp.
|
inline |
cast operator, useful for the implicit conversions
Definition at line 156 of file Guards.h.
|
private |
no assignement
|
private |