| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

- 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
GslErrorHandlers.cpp
Go to the documentation of this file.
1 // $Id: GslErrorHandlers.cpp,v 1.1 2003/11/19 16:55:59 mato Exp $
2 // ============================================================================
3 //
4 // ============================================================================
5 // Include files
6 // GaudiKernel
7 #include "GaudiKernel/GaudiException.h"
8 // GaudiGSL
9 #include "GaudiGSL/IGslSvc.h"
10 #include "GaudiGSL/GslError.h"
11 // local
12 #include "GaudiGSL/GslErrorHandlers.h"
13 #include "GaudiGSL/GaudiGSL.h"
14
15 #include <sstream>
16
26 void GslErrorHandlers::ignoreTheError
27 ( const char* /* reason */ ,
28 const char* /* file */ ,
29 int /* line */ ,
30 int /* code */ )
31 {}
32
33 void GslErrorHandlers::handleTheError
34 ( const char* reason ,
35 const char* file ,
36 int line ,
37 int code )
38 {
39 // het the GSL service
40 const IGslSvc* svc = GaudiGSL::gslSvc() ;
41 // handle the error if service is valid
42 if( 0 != svc ) { svc->handle( GslError( reason , file , line , code ) ) ; }
43 }
44
45 void GslErrorHandlers::throwException
46 ( const char* reason ,
47 const char* file ,
48 int line ,
49 int code )
50 {
51 std::ostringstream error;
52 error << " GSL ErrorCode=" << code << ": '" << reason
53 << "' in the file '" << file << "' at the line " << line;
54 throw GaudiException( error.str() , "*GLS Error*" , StatusCode::FAILURE );
55 }
56
57 // ============================================================================
58 // The END
59 // ============================================================================