![]() |
|
|
Generated: 24 Nov 2008 |
#include <GslErrorException.h>


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: | |
| GslErrorException::GslErrorException | ( | const std::string & | type, | |
| const std::string & | name, | |||
| const IInterface * | parent | |||
| ) |
Standard constructor.
| 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.
| StatusCode GslErrorException::handle | ( | const GslError & | error | ) | const [virtual] |
handle the GSL error
| error | error to be handled |
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 };
std::vector<int> GslErrorException::m_ignore [private] |