Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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"
14 #include "GaudiKernel/StatusCode.h"
15 // ============================================================================
16 class GaudiException;
17 
24 class GAUDI_API IErrorTool : virtual public IAlgTool {
25 public:
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
Define general base for Gaudi exception.
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
DeclareInterfaceID(IAlgTool, 4, 0)
InterfaceID.
STL class.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
STL class.
The interface implemented by the AlgTool base class.
Definition: IAlgTool.h:23
constexpr static const auto FAILURE
Definition: StatusCode.h:86
#define GAUDI_API
Definition: Kernel.h:71