| # Gaudi Framework, version v23r1 |

Home |  | Generated: Wed Feb 29 2012

Public Member Functions | Private Attributes

# 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 41 of file GslErrorException.cpp.

      : base_class ( type, name , parent )
      , m_ignore ()
    {
      declareProperty ( "IgnoreCodes" , m_ignore );
    }

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

destructor (protected and virtual)

destructor (protetced and virtual)

Definition at line 54 of file GslErrorException.cpp.

    {}

## 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 66 of file GslErrorException.cpp.

    {
      StatusCode sc = StatusCode::SUCCESS ;
      // code to be ignored?
      if( m_ignore.end() != std::find( m_ignore.begin () ,
                                       m_ignore.end   () ,
                                       error.code        ) ) { return sc ; }
      //
      std::ostringstream message;
      message << " GSL ErrorCode="
              << error.code << ": '" << error.reason << "' in the file '"
              << error.file << "' at the line " << error.line;
      throw GaudiException( message.str() , "*GLS Error*" , StatusCode::FAILURE );
      return StatusCode::SUCCESS ;
    }

## 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_v23r1/GaudiGSL/src/Components/GslErrorException.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v23r1/GaudiGSL/src/Components/GslErrorException.cpp

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