The Gaudi Framework
v25r3
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
GslErrorException.cpp
Go to the documentation of this file.
1
// $Id: GslErrorException.cpp,v 1.2 2006/01/10 20:00:05 hmd Exp $
2
// ============================================================================
3
// ============================================================================
4
// Include files
5
// from Gaudi
6
#include "
GaudiKernel/ToolFactory.h
"
7
#include "
GaudiKernel/MsgStream.h
"
8
#include "
GaudiKernel/GaudiException.h
"
9
// STD & STL
10
#include <algorithm>
11
#include <sstream>
12
// local
13
#include "
GslErrorException.h
"
14
15
// ============================================================================
23
// ============================================================================
24
25
// ============================================================================
31
// ============================================================================
32
33
// ============================================================================
39
// ============================================================================
40
GslErrorException::GslErrorException
41
(
const
std::string&
type
,
42
const
std::string& name ,
43
const
IInterface
* parent )
44
:
base_class
( type, name , parent )
45
, m_ignore ()
46
{
47
declareProperty (
"IgnoreCodes"
, m_ignore );
48
}
49
// ============================================================================
50
51
// ============================================================================
53
// ============================================================================
54
GslErrorException::~GslErrorException
(){}
55
// ============================================================================
56
57
// ============================================================================
64
// ============================================================================
65
StatusCode
GslErrorException::handle
66
(
const
GslError
& error )
const
67
{
68
StatusCode
sc
=
StatusCode::SUCCESS
;
69
// code to be ignored?
70
if
( m_ignore.end() != std::find( m_ignore.begin () ,
71
m_ignore.end () ,
72
error.
code
) ) {
return
sc
; }
73
//
74
std::ostringstream message;
75
message <<
" GSL ErrorCode="
76
<< error.
code
<<
": '"
<< error.
reason
<<
"' in the file '"
77
<< error.
file
<<
"' at the line "
<< error.
line
;
78
throw
GaudiException
( message.str() ,
"*GLS Error*"
,
StatusCode::FAILURE
);
80
return
StatusCode::SUCCESS
;
81
}
82
// ============================================================================
83
84
DECLARE_COMPONENT
(
GslErrorException
)
85
86
// ============================================================================
87
// The END
88
// ============================================================================
GslError::reason
std::string reason
error message ('reason')
Definition:
GslError.h:21
GslError::file
std::string file
file name
Definition:
GslError.h:23
GaudiException
Define general base for Gaudi exception.
Definition:
GaudiException.h:24
GslError
Helper class to represent GSL errors.
Definition:
GslError.h:17
MsgStream.h
GslError::code
int code
error code (GSL)
Definition:
GslError.h:27
GslError::line
int line
line number
Definition:
GslError.h:25
merge_files.sc
int sc
Definition:
merge_files.py:153
DECLARE_COMPONENT
#define DECLARE_COMPONENT(type)
Definition:
PluginService.h:35
GslErrorException::handle
virtual StatusCode handle(const GslError &error) const
handle the GSL error
Definition:
GslErrorException.cpp:66
gaudirun.type
string type
Definition:
gaudirun.py:126
StatusCode::FAILURE
Definition:
StatusCode.h:33
StatusCode::SUCCESS
Definition:
StatusCode.h:34
StatusCode
This class is used for returning status codes from appropriate routines.
Definition:
StatusCode.h:30
GaudiException.h
IInterface
Definition of the basic interface.
Definition:
IInterface.h:160
extends1
Base class used to extend a class implementing other interfaces.
Definition:
extends.h:10
GslErrorException::GslErrorException
GslErrorException(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
Definition:
GslErrorException.cpp:41
GslErrorException::~GslErrorException
virtual ~GslErrorException()
destructor (protected and virtual)
Definition:
GslErrorException.cpp:54
GslErrorException.h
GslErrorException
Concrete GSL eror handler It is just thrown the exception.
Definition:
GslErrorException.h:28
ToolFactory.h
GaudiGSL
src
Components
GslErrorException.cpp
Generated on Wed Jul 9 2014 09:54:13 for The Gaudi Framework by
1.8.7