| # Gaudi Framework, version v23r1 |

Home |  | Generated: Wed Feb 29 2012

# GslErrorHandlers.cpp

Go to the documentation of this file.

    00001 // $Id: GslErrorHandlers.cpp,v 1.1 2003/11/19 16:55:59 mato Exp $
    00002 // ============================================================================
    00003 //
    00004 // ============================================================================
    00005 // Include files
    00006 // GaudiKernel
    00007 #include "GaudiKernel/GaudiException.h"
    00008 // GaudiGSL
    00009 #include "GaudiGSL/IGslSvc.h"
    00010 #include "GaudiGSL/GslError.h"
    00011 // local
    00012 #include "GaudiGSL/GslErrorHandlers.h"
    00013 #include "GaudiGSL/GaudiGSL.h"
    00014
    00015 #include <sstream>
    00016
    00026 void GslErrorHandlers::ignoreTheError
    00027 ( const char* /* reason */ ,
    00028   const char* /* file   */ ,
    00029   int         /* line   */ ,
    00030   int         /* code   */ )
    00031 {}
    00032
    00033 void GslErrorHandlers::handleTheError
    00034 ( const char* reason ,
    00035   const char* file   ,
    00036   int         line   ,
    00037   int         code   )
    00038 {
    00039   // het the GSL service
    00040   const IGslSvc* svc = GaudiGSL::gslSvc() ;
    00041   // handle the error if service is valid
    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 // The END
    00059 // ============================================================================

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines