18 #include "gsl/gsl_errno.h"
41 , m_errorPolicy ( "GSL" )
42 , m_handlersTypeNames ()
46 declareProperty(
"ErrorPolicy" , m_errorPolicy ) ;
47 declareProperty(
"Handlers" , m_handlersTypeNames ) ;
48 declareProperty(
"IgnoreCodes" , m_ignore ) ;
72 <<
" Error in initialization of base class 'Service'"<<
endmsg;
80 { gsl_set_error_handler_off() ; }
82 { gsl_set_error_handler ( 0 ) ; }
92 <<
" Valid policies: "
93 <<
"[ 'GSL' , 'Off' , 'Abort' , 'Ignore' , 'Exception' , 'Handle' ]"
100 gsl_set_error_handler( handler );
103 <<
" GSL Error Handler is '"
120 std::find( it->begin() , it->end() ,
'/');
123 if( it->end() != ipos )
124 { sc = toolsvc->retrieveTool
126 std::string( *it , pos + 1, it->length() ), eh ,
this ) ; }
128 { sc = toolsvc->retrieveTool
129 ( *it ,
std::string( *it , pos + 1, it->length() ) ,
133 <<
" Could not retrieve tool '" << *it <<
"'"<<
endmsg ;
137 <<
" Could not retrieve tool '" << *it <<
"'"<<
endmsg ;
175 gsl_set_error_handler( hh );
189 gsl_set_error_handler( handler );
192 log <<
MSG::DEBUG <<
" New GSL handler is set '" ;
193 if( 0 == handler ) { log <<
"NULL" ; }
227 if( m_ignore.end() !=
std::find( m_ignore.begin () ,
229 error.
code ) ) {
return sc ; }
232 sc.
isSuccess() && m_handlers.end() != handler ; ++handler )
233 { sc = (*handler)->handle( error ); }