| The Gaudi Framework v32r1 (f65d50dc)

IErrorTool.h
Go to the documentation of this file.
1 #ifndef GAUDIALG_IERRORTOOL_H
2 #define GAUDIALG_IERRORTOOL_H 1
3 // ============================================================================
4 // Include files
5 // ============================================================================
6 // STD & STL
7 // ============================================================================
8 #include <string>
9 // ============================================================================
10 // GaudiKernel
11 // ============================================================================
12 #include "GaudiKernel/IAlgTool.h"
13 #include "GaudiKernel/IMessageSvc.h"
14 #include "GaudiKernel/StatusCode.h"
15 // ============================================================================
16 class GaudiException;
17
24 class GAUDI_API IErrorTool : virtual public IAlgTool {
25 public:
27 DeclareInterfaceID( IErrorTool, 2, 0 );
28
29 public:
51 virtual StatusCode Error( const std::string& msg, const StatusCode st = StatusCode::FAILURE,
52 const size_t mx = 10 ) const = 0;
53
64 virtual StatusCode Warning( const std::string& msg, const StatusCode st = StatusCode::FAILURE,
65 const size_t mx = 10 ) const = 0;
66
76 virtual StatusCode Print( const std::string& msg, const StatusCode st = StatusCode::SUCCESS,
77 const MSG::Level lev = MSG::INFO ) const = 0;
78
88 virtual void Assert( const bool ok, const std::string& message = "",
89 const StatusCode sc = StatusCode::FAILURE ) const = 0;
90
99 virtual void Exception( const std::string& msg, const GaudiException& exc,
100 const StatusCode sc = StatusCode::FAILURE ) const = 0;
101
110 virtual void Exception( const std::string& msg, const std::exception& exc,
111 const StatusCode sc = StatusCode::FAILURE ) const = 0;
112
120 virtual void Exception( const std::string& msg = "no message", const StatusCode sc = StatusCode::FAILURE ) const = 0;
121
122 protected:
123 // protected destructor
124 virtual ~IErrorTool() = default;
125 };
126
127 // ============================================================================
128 #endif // GAUDIALG_IERRORTOOL_H
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:21
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
IAlgTool::DeclareInterfaceID
DeclareInterfaceID(IAlgTool, 4, 0)
InterfaceID.
std::string
STL class.
MSG::Level
Level
Definition: IMessageSvc.h:15
IErrorTool
Definition: IErrorTool.h:24
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
IAlgTool.h
IMessageSvc.h
std::exception
STL class.
IAlgTool
The interface implemented by the AlgTool base class.
Definition: IAlgTool.h:23
GaudiMP.FdsRegistry.msg
msg
Definition: FdsRegistry.py:8
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
StatusCode.h
MSG::INFO
Definition: IMessageSvc.h:15
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:71