The Gaudi Framework
v26r1
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
GslErrorException::GslErrorException
33
(
const
std::string&
type
,
34
const
std::string& name ,
35
const
IInterface
* parent )
36
:
base_class
( type, name , parent )
37
, m_ignore ()
38
{
39
declareProperty (
"IgnoreCodes"
, m_ignore );
40
}
41
// ============================================================================
42
43
// ============================================================================
45
// ============================================================================
46
GslErrorException::~GslErrorException
(){}
47
// ============================================================================
48
49
// ============================================================================
56
// ============================================================================
57
StatusCode
GslErrorException::handle
58
(
const
GslError
& error )
const
59
{
60
StatusCode
sc
=
StatusCode::SUCCESS
;
61
// code to be ignored?
62
if
( m_ignore.end() != std::find( m_ignore.begin () ,
63
m_ignore.end () ,
64
error.
code
) ) {
return
sc
; }
65
//
66
std::ostringstream message;
67
message <<
" GSL ErrorCode="
68
<< error.
code
<<
": '"
<< error.
reason
<<
"' in the file '"
69
<< error.
file
<<
"' at the line "
<< error.
line
;
70
throw
GaudiException
( message.str() ,
"*GLS Error*"
,
StatusCode::FAILURE
);
72
return
StatusCode::SUCCESS
;
73
}
74
// ============================================================================
75
76
DECLARE_COMPONENT
(
GslErrorException
)
77
78
// ============================================================================
79
// The END
80
// ============================================================================
GaudiGSL
src
Components
GslErrorException.cpp
Generated on Mon Feb 16 2015 11:56:54 for The Gaudi Framework by
1.8.2