| The Gaudi Framework v28r2p1 (f1a77ff4)

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

- File List
- File Members

GslErrorPrint.cpp
Go to the documentation of this file.
1 // Include files
2 // from Gaudi
3 #include "GaudiKernel/MsgStream.h"
4 #include "GaudiKernel/IChronoStatSvc.h"
5 #include "GaudiKernel/Stat.h"
6 // local
7 #include "GslErrorPrint.h"
8
9 // ============================================================================
17 // ============================================================================
18 DECLARE_COMPONENT(GslErrorPrint)
19 // ============================================================================
20
21 // ============================================================================
27 // ============================================================================
28 GslErrorPrint::GslErrorPrint
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 // ============================================================================
46 StatusCode GslErrorPrint::handle
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 // ============================================================================
GslError::reason
std::string reason
error message (&#39;reason&#39;)
Definition: GslError.h:19
MsgStream
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
StatusCode::SUCCESS
Definition: StatusCode.h:30
GslError::file
std::string file
file name
Definition: GslError.h:21
GslError
Helper class to represent GSL errors.
Definition: GslError.h:15
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
MsgStream.h
GslError::code
int code
error code (GSL)
Definition: GslError.h:25
GslErrorPrint::handle
StatusCode handle(const GslError &error) const override
handle the GSL error
Definition: GslErrorPrint.cpp:47
std
STL namespace.
GslError::line
int line
line number
Definition: GslError.h:23
DECLARE_COMPONENT
#define DECLARE_COMPONENT(type)
Definition: PluginService.h:36
GslErrorPrint.h
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
ForwardSchedulerSimpleTest.msgSvc
msgSvc
Definition: ForwardSchedulerSimpleTest.py:112
IInterface
Definition of the basic interface.
Definition: IInterface.h:234
gaudirun.type
type
Definition: gaudirun.py:125
GslErrorPrint
Concrete GSL eror handler It is just prints the GSL errors.
Definition: GslErrorPrint.h:22
CommonMessaging
Definition: CommonMessaging.h:55
Stat.h
MSG::ERROR
Definition: IMessageSvc.h:21
IChronoStatSvc.h
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
Gaudi.Configuration.log
log
Definition: Configuration.py:13