try {
std::vector<std::string> serials;
std::pair<std::shared_ptr<CRL>, std::string> rev = sign->revoke( x.second, serials );
- } catch( const char* c ) {
- logger::error( "Exception: ", c );
+ } catch( const std::exception &e ) {
+ logger::error( "Exception: ", e.what() );
}
}
}
continue;
}
- logger::note( "FINE: CERTIFICATE LOG:\n", res->log );
- logger::note( "FINE: CERTIFICATE:\n", res->certificate );
+ logger::note( "FINE: CERTIFICATE LOG:\n", res->log,
+ "FINE: CERTIFICATE:\n", res->certificate );
+
std::string fn = writeBackFile( job->target.c_str(), res->certificate, keyDir );
if( fn.empty() ) {
}
continue;
- } catch( const char* c ) {
- logger::error( "ERROR: ", c );
- } catch( std::string& c ) {
- logger::error( "ERROR: ", c );
+ } catch( std::exception& c ) {
+ logger::error( "ERROR: ", c.what() );
}
try {
jp->failJob( job );
- } catch( const char* c ) {
- logger::error( "ERROR: ", c );
- } catch( std::string& c ) {
- logger::error( "ERROR: ", c );
+ } catch( std::exception& c ) {
+ logger::error( "ERROR: ", c.what() );
}
} else if( job->task == "revoke" ) {
try {
+ logger::note( "revoking" );
auto data = jp->getRevocationInfo( job );
std::vector<std::string> serials;
serials.push_back( data.first );
+ logger::note( "revoking" );
std::pair<std::shared_ptr<CRL>, std::string> rev = sign->revoke( CAs.at( data.second ), serials );
std::string date = rev.second;
const unsigned char* pos = ( const unsigned char* ) date.data();
jp->writeBackRevocation( job, timeToString( time ) );
jp->finishJob( job );
- } catch( const char* c ) {
- logger::error( "Exception: ", c );
- } catch( const std::string& c ) {
- logger::error( "Exception: ", c );
+ } catch( const std::exception& c ) {
+ logger::error( "Exception: ", c.what() );
}
} else {
logger::errorf( "Unknown job type (\"%s\")", job->task );
if( !DAEMON || once ) {
return 0;
}
- } catch( const char* c ) {
- logger::error( "Exception: ", c );
- } catch( const std::string& c ) {
- logger::error( "Exception: ", c );
} catch ( std::exception &e ){
- logger::errorf ( "Exception while fetchJob: %s", e.what() );
+ logger::errorf ( "std::exception in mainloop: %s", e.what() );
}
}