Gaudi Framework, version v20r3

Generated: 24 Nov 2008

GslErrorException Class Reference

#include <GslErrorException.h>

Inheritance diagram for GslErrorException:

Inheritance graph
[legend]
Collaboration diagram for GslErrorException:

Collaboration graph
[legend]

List of all members.


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.


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:

Constructor & Destructor Documentation

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

Standard constructor.

Parameters:
type tool type (?)
name tool name
parent pointer to parent

Definition at line 43 of file GslErrorException.cpp.

00046   : AlgTool ( type, name , parent ) 
00047   , m_ignore ()
00048 { 
00049   declareInterface<IGslErrorHandler> (this);
00050   declareProperty ( "IgnoreCodes" , m_ignore );
00051 };

GslErrorException::~GslErrorException (  )  [virtual]

destructor (protected and virtual)

destructor (protetced and virtual)

Definition at line 57 of file GslErrorException.cpp.

00057 {};


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

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


Member Data Documentation

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

codes to be ignored:

Definition at line 59 of file GslErrorException.h.


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

Generated at Mon Nov 24 14:45:28 2008 for Gaudi Framework, version v20r3 by Doxygen version 1.5.6 written by Dimitri van Heesch, © 1997-2004