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"
13 #include "GaudiKernel/StatusCode.h"
15 // ============================================================================
16 class GaudiException ;
17 
24 class GAUDI_API IErrorTool: virtual public IAlgTool
25 {
26 public:
29 
30 public:
31 
53  virtual StatusCode Error
54  ( const std::string& msg ,
55  const StatusCode st = StatusCode::FAILURE ,
56  const size_t mx = 10 ) const = 0 ;
57 
68  virtual StatusCode Warning
69  ( const std::string& msg ,
70  const StatusCode st = StatusCode::FAILURE ,
71  const size_t mx = 10 ) const = 0 ;
72 
82  virtual StatusCode Print
83  ( const std::string& msg ,
84  const StatusCode st = StatusCode::SUCCESS ,
85  const MSG::Level lev = MSG::INFO ) const = 0 ;
86 
96  virtual void Assert
97  ( const bool ok ,
98  const std::string& message = "" ,
99  const StatusCode sc = StatusCode::FAILURE ) const = 0 ;
100 
109  virtual void Exception
110  ( const std::string & msg ,
111  const GaudiException & exc ,
112  const StatusCode sc = StatusCode::FAILURE ) const = 0 ;
113 
122  virtual void Exception
123  ( const std::string & msg ,
124  const std::exception & exc ,
125  const StatusCode sc = StatusCode::FAILURE ) const = 0 ;
126 
134  virtual void Exception
135  ( const std::string& msg = "no message" ,
136  const StatusCode sc = StatusCode::FAILURE ) const = 0 ;
137 
138 protected:
139 
140  // protected destructor
141  virtual ~IErrorTool() = default;
142 
143 };
144 
145 // ============================================================================
146 #endif // GAUDIALG_IERRORTOOL_H
147 // ============================================================================
Define general base for Gaudi exception.
DeclareInterfaceID(IAlgTool, 4, 0)
InterfaceID.
STL class.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
STL class.
The interface implemented by the AlgTool base class.
Definition: IAlgTool.h:23
#define GAUDI_API
Definition: Kernel.h:107