| The Gaudi Framework v28r2-patches (bc4ad17a)

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

- File List
- File Members

GslErrorException.cpp
Go to the documentation of this file.
1 // ============================================================================
2 // Include files
3 // from Gaudi
4 #include "GaudiKernel/GaudiException.h"
5 // STD & STL
6 #include <algorithm>
7 #include <string>
8 // local
9 #include "GslErrorException.h"
10
11 // ============================================================================
19 // ============================================================================
20
21 // ============================================================================
28 // ============================================================================
29 StatusCode GslErrorException::handle
30 ( const GslError& error ) const
31 {
32 // throw if code is not in the list of codes to be ignored
33 if( m_ignore.end() == std::find( m_ignore.begin () ,
34 m_ignore.end () ,
35 error.code ) ) {
36 throw GaudiException( " GSL ErrorCode=" + std::to_string( error.code ) +
37 ": '" + error.reason +
38 "' in the file '" + error.file +
39 "' at line " + std::to_string(error.line)
40 , "*GLS Error*" , StatusCode::FAILURE );
41 }
43 return StatusCode::SUCCESS ;
44 }
45 // ============================================================================
46
47 DECLARE_COMPONENT(GslErrorException)
48
49 // ============================================================================
50 // The END
51 // ============================================================================
GslError::reason
std::string reason
error message (&#39;reason&#39;)
Definition: GslError.h:19
StatusCode::SUCCESS
Definition: StatusCode.h:30
GslError::file
std::string file
file name
Definition: GslError.h:21
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:23
GslError
Helper class to represent GSL errors.
Definition: GslError.h:15
StatusCode::FAILURE
Definition: StatusCode.h:29
GslErrorException::handle
StatusCode handle(const GslError &error) const override
handle the GSL error
Definition: GslErrorException.cpp:30
GslError::code
int code
error code (GSL)
Definition: GslError.h:25
std::to_string
T to_string(T...args)
GslError::line
int line
line number
Definition: GslError.h:23
DECLARE_COMPONENT
#define DECLARE_COMPONENT(type)
Definition: PluginService.h:36
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
GaudiException.h
std::find
T find(T...args)
GslErrorException.h
GslErrorException
Concrete GSL eror handler It is just thrown the exception.
Definition: GslErrorException.h:26