| The Gaudi Framework v29r1 (5cd95fa2)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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 {
26 public:
28 DeclareInterfaceID( IErrorTool, 2, 0 );
29
30 public:
52 virtual StatusCode Error( const std::string& msg, const StatusCode st = StatusCode::FAILURE,
53 const size_t mx = 10 ) const = 0;
54
65 virtual StatusCode Warning( const std::string& msg, const StatusCode st = StatusCode::FAILURE,
66 const size_t mx = 10 ) const = 0;
67
77 virtual StatusCode Print( const std::string& msg, const StatusCode st = StatusCode::SUCCESS,
78 const MSG::Level lev = MSG::INFO ) const = 0;
79
89 virtual void Assert( const bool ok, const std::string& message = "",
90 const StatusCode sc = StatusCode::FAILURE ) const = 0;
91
100 virtual void Exception( const std::string& msg, const GaudiException& exc,
101 const StatusCode sc = StatusCode::FAILURE ) const = 0;
102
111 virtual void Exception( const std::string& msg, const std::exception& exc,
112 const StatusCode sc = StatusCode::FAILURE ) const = 0;
113
121 virtual void Exception( const std::string& msg = "no message", const StatusCode sc = StatusCode::FAILURE ) const = 0;
122
123 protected:
124 // protected destructor
125 virtual ~IErrorTool() = default;
126 };
127
128 // ============================================================================
129 #endif // GAUDIALG_IERRORTOOL_H
130 // ============================================================================
StatusCode::SUCCESS
Definition: StatusCode.h:31
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:22
StatusCode::FAILURE
Definition: StatusCode.h:31
IAlgTool::DeclareInterfaceID
DeclareInterfaceID(IAlgTool, 4, 0)
InterfaceID.
std::string
STL class.
MSG::Level
Level
Definition: IMessageSvc.h:16
IErrorTool
Definition: IErrorTool.h:24
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
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.h
MSG::INFO
Definition: IMessageSvc.h:16
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:110