Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
GslErrorException.cpp
Go to the documentation of this file.
1 // ============================================================================
2 // Include files
3 // from Gaudi
5 // STD & STL
6 #include <algorithm>
7 #include <string>
8 // local
9 #include "GslErrorException.h"
10 
11 // ============================================================================
19 // ============================================================================
20 
21 // ============================================================================
28 // ============================================================================
30  // throw if code is not in the list of codes to be ignored
31  if ( m_ignore.end() == std::find( m_ignore.begin(), m_ignore.end(), error.code ) ) {
32  throw GaudiException( " GSL ErrorCode=" + std::to_string( error.code ) + ": '" + error.reason + "' in the file '" +
33  error.file + "' at line " + std::to_string( error.line ),
34  "*GLS Error*", StatusCode::FAILURE );
35  }
37  return StatusCode::SUCCESS;
38 }
39 // ============================================================================
40 
42 
43 // ============================================================================
44 // The END
45 // ============================================================================
std::string reason
error message (&#39;reason&#39;)
Definition: GslError.h:19
std::string file
file name
Definition: GslError.h:21
Define general base for Gaudi exception.
Helper class to represent GSL errors.
Definition: GslError.h:16
StatusCode handle(const GslError &error) const override
handle the GSL error
int code
error code (GSL)
Definition: GslError.h:25
T to_string(T...args)
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
int line
line number
Definition: GslError.h:23
#define DECLARE_COMPONENT(type)
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
T find(T...args)
Concrete GSL eror handler It is just thrown the exception.
constexpr static const auto FAILURE
Definition: StatusCode.h:86
Gaudi::Property< std::vector< int > > m_ignore