The Gaudi Framework
v30r3 (a5ef0a68)
|
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 ()=delete | |
ExceptionGuard (const ExceptionGuard &)=delete | |
ExceptionGuard & | operator= (const ExceptionGuard &)=delete |
Private Attributes | |
StatusCode | m_sc = StatusCode::FAILURE |
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 116 of file Guards.h.
Gaudi::Guards::ExceptionGuard::~ExceptionGuard | ( | ) |
destructor
Definition at line 54 of file Guards.cpp.
|
privatedelete |
|
privatedelete |
|
inline |
the result of function evaluation
Definition at line 150 of file Guards.h.
|
protected |
local handler of GaudiException
Definition at line 24 of file Guards.cpp.
|
protected |
local handler of std::exception
Definition at line 36 of file Guards.cpp.
|
protected |
local handler of UNKNOWN exceptions
Definition at line 46 of file Guards.cpp.
|
inline |
cast operator, useful for the implicit conversions
Definition at line 152 of file Guards.h.
|
privatedelete |
|
private |