Handle crypto exceptions in UI without dying

This commit is contained in:
Keith Winstein
2012-02-02 16:48:35 -05:00
parent f6de17eb71
commit 3edccf1f2e
3 changed files with 15 additions and 9 deletions
+3 -1
View File
@@ -294,8 +294,10 @@ void serve( int host_fd )
network.tick();
} catch ( Network::NetworkException e ) {
fprintf( stderr, "%s: %s\r\n", e.function.c_str(), strerror( e.the_errno ) );
fprintf( stderr, "%s: %s\n", e.function.c_str(), strerror( e.the_errno ) );
sleep( 1 );
} catch ( Crypto::CryptoException e ) {
fprintf( stderr, "Crypto exception: %s\n", e.text.c_str() );
}
}
}