Gaudi Framework, version v22r4

Home   Generated: Fri Sep 2 2011
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:
Inheritance graph
[legend]
Collaboration diagram for GslErrorException:
Collaboration graph
[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:
typetool type (?)
nametool name
parentpointer to parent
See also:
ToolFactory
IToolFactory
IFactory Standard constructor
Parameters:
typetool type (?)
nametool name
parentpointer 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:
errorerror 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

codes to be ignored:

Definition at line 56 of file GslErrorException.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated at Fri Sep 2 2011 16:25:25 for Gaudi Framework, version v22r4 by Doxygen version 1.7.2 written by Dimitri van Heesch, © 1997-2004