The Gaudi Framework
master (37c0b60a)
|
#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 |
Gaudi::Guards::ExceptionGuard::~ExceptionGuard | ( | ) |
|
privatedelete |
|
privatedelete |
|
inline |
|
protected |
local handler of GaudiException
Definition at line 34 of file Guards.cpp.
|
protected |
|
protected |
|
inline |
|
privatedelete |
|
private |