20 #include "gsl/gsl_errno.h"
51 , m_errorPolicy ( "GSL" )
52 , m_handlersTypeNames ()
56 declareProperty(
"ErrorPolicy" , m_errorPolicy ) ;
57 declareProperty(
"Handlers" , m_handlersTypeNames ) ;
58 declareProperty(
"IgnoreCodes" , m_ignore ) ;
82 <<
" Error in initialization of base class 'Service'"<<
endmsg;
90 { gsl_set_error_handler_off() ; }
92 { gsl_set_error_handler ( 0 ) ; }
102 <<
" Valid policies: "
103 <<
"[ 'GSL' , 'Off' , 'Abort' , 'Ignore' , 'Exception' , 'Handle' ]"
110 gsl_set_error_handler( handler );
113 <<
" GSL Error Handler is '"
130 std::find( it->begin() , it->end() ,
'/');
133 if( it->end() != ipos )
134 { sc = toolsvc->retrieveTool
136 std::string( *it , pos + 1, it->length() ), eh ,
this ) ; }
138 { sc = toolsvc->retrieveTool
139 ( *it ,
std::string( *it , pos + 1, it->length() ) ,
143 <<
" Could not retrieve tool '" << *it <<
"'"<<
endmsg ;
147 <<
" Could not retrieve tool '" << *it <<
"'"<<
endmsg ;
185 gsl_set_error_handler( hh );
199 gsl_set_error_handler( handler );
202 log <<
MSG::DEBUG <<
" New GSL handler is set '" ;
203 if( 0 == handler ) { log <<
"NULL" ; }
237 if( m_ignore.end() !=
std::find( m_ignore.begin () ,
239 error.
code ) ) {
return sc ; }
242 sc.
isSuccess() && m_handlers.end() != handler ; ++handler )
243 { sc = (*handler)->handle( error ); }