|
Gaudi Framework, version v22r1 |
| Home | Generated: Mon Feb 28 2011 |
Concrete GSL eror handler It is just thrown the exception. More...
#include <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: | |
Concrete GSL eror handler It is just thrown the exception.
Definition at line 28 of file GslErrorException.h.
| GslErrorException::GslErrorException | ( | const std::string & | type, |
| const std::string & | name, | ||
| const IInterface * | parent | ||
| ) |
Standard constructor.
Declaration of the Tool Factory.
| type | tool type (?) |
| name | tool name |
| parent | pointer to parent |
| type | tool type (?) |
| name | tool name |
| parent | pointer to parent |
Definition at line 42 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 55 of file GslErrorException.cpp.
{}
| StatusCode GslErrorException::handle | ( | const GslError & | error ) | const [virtual] |
handle the GSL error
| error | error to be handled |
Implements IGslErrorHandler.
Definition at line 67 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::string message( " GSL ErrorCode=" );
static char s_aux[512];
message +=
std::string( s_aux , s_aux + sprintf( s_aux , "%d" , error.code ) );
message += ": '" ;
message += error.reason ;
message += "' in the file '" ;
message += error.file ;
message += "' at the line " ;
message +=
std::string( s_aux , s_aux + sprintf( s_aux , "%d" , error.line ) );
message += "'" ;
throw GaudiException( message , "*GLS Error*" , StatusCode::FAILURE );
return StatusCode::SUCCESS ;
}
std::vector<int> GslErrorException::m_ignore [private] |
codes to be ignored:
Definition at line 56 of file GslErrorException.h.