| # Gaudi Framework, version v21r8 |

Home |  | Generated: 17 Mar 2010

# GslErrorException Class Reference

Concrete GSL eror handler It is just thrown the exception. More...

`#include <GslErrorException.h>`

Inheritance diagram for GslErrorException:

[legend]
Collaboration diagram for GslErrorException:

[legend]

List of all members.

## Public Member Functions
virtual StatusCode | handle (const GslError &error) const
| handle the GSL error
| GslErrorException (const std::string &type, const std::string &name, const IInterface *parent)
| Standard constructor.
virtual | ~GslErrorException ()
| destructor (protected and virtual)
## Private Attributes
std::vector< int > | m_ignore
| codes to be ignored:

## Detailed Description

Concrete GSL eror handler It is just thrown the exception.

Attention:
  The error handling could be "turned off" for selected error codes (e.g. GSL_SUCCESS or GSL_CONTINUE ) using "IgnoreCodes" property

Author:
  Vanya Belyaev Ivan.Belyaev@itep.ru

Date:
  30/04/2002

Definition at line 28 of file GslErrorException.h.

## Constructor & Destructor Documentation

GslErrorException::GslErrorException | ( | const std::string & | type,
|  | const std::string & | name,
|  | const IInterface * | parent |
| ) |  |  |

Standard constructor.

Declaration of the Tool Factory.

Parameters:

  | type | tool type (?)
  | name | tool name
  | parent | pointer to parent

See also:
  ToolFactory

  IToolFactory

  IFactory Standard constructor

Parameters:

  | type | tool type (?)
  | name | tool name
  | parent | pointer to parent

Definition at line 42 of file GslErrorException.cpp.

    00045   : base_class ( type, name , parent )
    00046   , m_ignore ()
    00047 {
    00048   declareProperty ( "IgnoreCodes" , m_ignore );
    00049 }

GslErrorException::~GslErrorException | ( |  | ) | `[virtual]`

destructor (protected and virtual)

destructor (protetced and virtual)

Definition at line 55 of file GslErrorException.cpp.

    00055 {}

## Member Function Documentation

StatusCode GslErrorException::handle | ( | const GslError & | error | ) | const`[virtual]`

handle the GSL error

See also:
  IGslErrorHandler

Parameters:

  | error | error to be handled

See also:
  GslError

Returns:
  status code

Implements IGslErrorHandler.

Definition at line 67 of file GslErrorException.cpp.

    00068 {
    00069   StatusCode sc = StatusCode::SUCCESS ;
    00070   // code to be ignored?
    00071   if( m_ignore.end() != std::find( m_ignore.begin () ,
    00072                                    m_ignore.end   () ,
    00073                                    error.code        ) ) { return sc ; }
    00074   //
    00075   std::string message( " GSL ErrorCode=" );
    00076   static char s_aux[512];
    00077   message +=
    00078     std::string( s_aux  , s_aux  + sprintf( s_aux , "%d" , error.code  ) );
    00079   message += ": '"   ;
    00080   message += error.reason  ;
    00081   message += "' in the file '" ;
    00082   message += error.file    ;
    00083   message += "' at the line "  ;
    00084   message +=
    00085     std::string( s_aux  , s_aux  + sprintf( s_aux , "%d" , error.line ) );
    00086   message += "'"     ;
    00087   throw GaudiException( message , "*GLS Error*" , StatusCode::FAILURE );
    00089   return StatusCode::SUCCESS ;
    00090 }

## Member Data Documentation

std::vector<int> GslErrorException::m_ignore`[private]`

codes to be ignored:

Definition at line 56 of file GslErrorException.h.

The documentation for this class was generated from the following files:

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r8/GaudiGSL/src/Components/GslErrorException.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r8/GaudiGSL/src/Components/GslErrorException.cpp