All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
IErrorTool.h
Go to the documentation of this file.
1 // $Id: IErrorTool.h,v 1.2 2004/10/18 08:17:59 mato Exp $
2 // ============================================================================
3 #ifndef GAUDIALG_IERRORTOOL_H
4 #define GAUDIALG_IERRORTOOL_H 1
5 // ============================================================================
6 // Include files
7 // ============================================================================
8 // STD & STL
9 // ============================================================================
10 #include <string>
11 // ============================================================================
12 // GaudiKernel
13 // ============================================================================
14 #include "GaudiKernel/IAlgTool.h"
15 #include "GaudiKernel/StatusCode.h"
17 // ============================================================================
18 class GaudiException ;
19 
26 class GAUDI_API IErrorTool: virtual public IAlgTool
27 {
28 public:
31 
32 public:
33 
55  virtual StatusCode Error
56  ( const std::string& msg ,
57  const StatusCode st = StatusCode::FAILURE ,
58  const size_t mx = 10 ) const = 0 ;
59 
70  virtual StatusCode Warning
71  ( const std::string& msg ,
72  const StatusCode st = StatusCode::FAILURE ,
73  const size_t mx = 10 ) const = 0 ;
74 
84  virtual StatusCode Print
85  ( const std::string& msg ,
86  const StatusCode st = StatusCode::SUCCESS ,
87  const MSG::Level lev = MSG::INFO ) const = 0 ;
88 
98  virtual void Assert
99  ( const bool ok ,
100  const std::string& message = "" ,
101  const StatusCode sc = StatusCode::FAILURE ) const = 0 ;
102 
111  virtual void Exception
112  ( const std::string & msg ,
113  const GaudiException & exc ,
114  const StatusCode sc = StatusCode::FAILURE ) const = 0 ;
115 
124  virtual void Exception
125  ( const std::string & msg ,
126  const std::exception & exc ,
127  const StatusCode sc = StatusCode::FAILURE ) const = 0 ;
128 
136  virtual void Exception
137  ( const std::string& msg = "no message" ,
138  const StatusCode sc = StatusCode::FAILURE ) const = 0 ;
139 
140 protected:
141 
142  // protected destructor
143  virtual ~IErrorTool() ;
144 
145 };
146 
147 // ============================================================================
148 #endif // GAUDIALG_IERRORTOOL_H
149 // ============================================================================
Define general base for Gaudi exception.
DeclareInterfaceID(IAlgTool, 3, 0)
InterfaceID.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
The interface implemented by the AlgTool base class.
Definition: IAlgTool.h:23
#define GAUDI_API
Definition: Kernel.h:108