All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
GslErrorPrint.cpp
Go to the documentation of this file.
1 // Include files
2 // from Gaudi
5 #include "GaudiKernel/Stat.h"
6 // local
7 #include "GslErrorPrint.h"
8 
9 // ============================================================================
17 // ============================================================================
19 // ============================================================================
20 
21 // ============================================================================
27 // ============================================================================
29 ( const std::string& type ,
30  const std::string& name ,
31  const IInterface* parent )
32  : base_class ( type, name , parent )
33 {}
34 // ============================================================================
35 
36 // ============================================================================
37 
38 // ============================================================================
45 // ============================================================================
47 ( const GslError& error ) const
48 {
49  MsgStream log( msgSvc() , name() );
50  log << MSG::ERROR
51  << " GSL code " << error.code
52  << " Message '" << error.reason << "'"
53  << " File '" << error.file << "'"
54  << " Line " << error.line << endmsg ;
55  //
56  return StatusCode::SUCCESS ;
57 }
58 // ============================================================================
59 
60 
61 // ============================================================================
62 // The END
63 // ============================================================================
std::string reason
error message (&#39;reason&#39;)
Definition: GslError.h:19
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
std::string file
file name
Definition: GslError.h:21
Helper class to represent GSL errors.
Definition: GslError.h:15
int code
error code (GSL)
Definition: GslError.h:25
StatusCode handle(const GslError &error) const override
handle the GSL error
STL namespace.
int line
line number
Definition: GslError.h:23
#define DECLARE_COMPONENT(type)
Definition: PluginService.h:36
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
Definition of the basic interface.
Definition: IInterface.h:234
Concrete GSL eror handler It is just prints the GSL errors.
Definition: GslErrorPrint.h:22
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244