| The Gaudi Framework v29r0 (ff2e7097)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

Functions
GslErrorHandlers Namespace Reference

The collection of Error Handlers for GSL. More...

## Functions
GAUDI_API void | ignoreTheError (const char *reason, const char *file, int line, int code)
| The simplest Gsl Error handler, It simply ingnores the error. More...
GAUDI_API void | handleTheError (const char *reason, const char *file, int line, int code)
| The simplest Gsl Error handler, It delegates the actual error handling to GSL Service. More...
GAUDI_API void | throwException (const char *reason, const char *file, int line, int code)
| The simple Gsl Error handler, it throwns the Gaudi Exception. More...

## Detailed Description

The collection of Error Handlers for GSL.

Author
  Vanya Belyaev Ivan..nosp@m.Bely.nosp@m.aev@i.nosp@m.tep..nosp@m.ru

Date
  29/04/2002

## Function Documentation

void GslErrorHandlers::handleTheError | ( | const char * | reason,
|  | const char * | file,
|  | int | line,
|  | int | code
| ) |  |

The simplest Gsl Error handler, It delegates the actual error handling to GSL Service.

See also
  IGslSvc

Parameters

  reason | error reason (message)
  file | file name
  line | line number
  code | error code

Author
  Vanya Belyaev Ivan..nosp@m.Bely.nosp@m.aev@i.nosp@m.tep..nosp@m.ru

Date
  29/04/2002

Definition at line 28 of file GslErrorHandlers.cpp.

29 {
30 // het the GSL service
31 const IGslSvc* svc = GaudiGSL::gslSvc();
32 // handle the error if service is valid
33 if ( nullptr != svc ) {
34 svc->handle( GslError( reason, file, line, code ) );
35 }
36 }
GslError
Helper class to represent GSL errors.
Definition: GslError.h:16
GaudiGSL::gslSvc
static const IGslSvc * gslSvc()
static accessor to Gaudi GSL Service
Definition: GaudiGSL.cpp:30
IGslSvc
The abstract interface to "deal" with GNU Scientific Library (GLS) The main task is the error handlin...
Definition: IGslSvc.h:16
IGslSvc::handle
virtual StatusCode handle(const GslError &error) const =0
handle the GSL error
plotSpeedupsPyRoot.line
line
Definition: plotSpeedupsPyRoot.py:172

void GslErrorHandlers::ignoreTheError | ( | const char * | reason,
|  | const char * | file,
|  | int | line,
|  | int | code
| ) |  |

The simplest Gsl Error handler, It simply ingnores the error.

See also
  IGslSvc

Parameters

  reason | error reason (message)
  file | file name
  line | line number
  code | error code

Author
  Vanya Belyaev Ivan..nosp@m.Bely.nosp@m.aev@i.nosp@m.tep..nosp@m.ru

Date
  29/04/2002

Definition at line 23 of file GslErrorHandlers.cpp.

25 {
26 }

void GslErrorHandlers::throwException | ( | const char * | reason,
|  | const char * | file,
|  | int | line,
|  | int | code
| ) |  |

The simple Gsl Error handler, it throwns the Gaudi Exception.

Exceptions

  GaudiException |

See also
  GaudiException

Parameters

  reason | error reason (message)
  file | file name
  line | line number
  code | error code

Author
  Vanya Belyaev Ivan..nosp@m.Bely.nosp@m.aev@i.nosp@m.tep..nosp@m.ru

Date
  29/04/2002

Definition at line 38 of file GslErrorHandlers.cpp.

39 {
40 std::ostringstream error;
41 error << " GSL ErrorCode=" << code << ": '" << reason << "' in the file '" << file << "' at the line " << line;
42 throw GaudiException( error.str(), "*GLS Error*", StatusCode::FAILURE );
43 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:22
StatusCode::FAILURE
Definition: StatusCode.h:31
std::ostringstream
STL class.
std::ostringstream::str
T str(T...args)
plotSpeedupsPyRoot.line
line
Definition: plotSpeedupsPyRoot.py:172