Catch exceptions by reference
Found by cppcheck. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
committed by
Keith Winstein
parent
5365d6b21d
commit
e2abb8524f
@@ -175,10 +175,10 @@ int main( int argc, char *argv[] )
|
||||
|
||||
try {
|
||||
client.main();
|
||||
} catch ( Network::NetworkException e ) {
|
||||
} catch ( const Network::NetworkException &e ) {
|
||||
fprintf( stderr, "Network exception: %s: %s\r\n",
|
||||
e.function.c_str(), strerror( e.the_errno ) );
|
||||
} catch ( Crypto::CryptoException e ) {
|
||||
} catch ( const Crypto::CryptoException &e ) {
|
||||
fprintf( stderr, "Crypto exception: %s\r\n",
|
||||
e.text.c_str() );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user