Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #include "GaudiKernel/GaudiException.h"
00008
00009 #include "GaudiGSL/IGslSvc.h"
00010 #include "GaudiGSL/GslError.h"
00011
00012 #include "GaudiGSL/GslErrorHandlers.h"
00013 #include "GaudiGSL/GaudiGSL.h"
00014
00015 #include <sstream>
00016
00026 void GslErrorHandlers::ignoreTheError
00027 ( const char* ,
00028 const char* ,
00029 int ,
00030 int )
00031 {}
00032
00033 void GslErrorHandlers::handleTheError
00034 ( const char* reason ,
00035 const char* file ,
00036 int line ,
00037 int code )
00038 {
00039
00040 const IGslSvc* svc = GaudiGSL::gslSvc() ;
00041
00042 if( 0 != svc ) { svc->handle( GslError( reason , file , line , code ) ) ; }
00043 }
00044
00045 void GslErrorHandlers::throwException
00046 ( const char* reason ,
00047 const char* file ,
00048 int line ,
00049 int code )
00050 {
00051 std::ostringstream error;
00052 error << " GSL ErrorCode=" << code << ": '" << reason
00053 << "' in the file '" << file << "' at the line " << line;
00054 throw GaudiException( error.str() , "*GLS Error*" , StatusCode::FAILURE );
00055 }
00056
00057
00058
00059