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
@@ -61,7 +61,7 @@ int main( int argc, char *argv[] )
|
||||
fprintf( stderr, "Nonce = %ld\n",
|
||||
(long)message.nonce.val() );
|
||||
cout << message.text;
|
||||
} catch ( CryptoException e ) {
|
||||
} catch ( const CryptoException &e ) {
|
||||
cerr << e.text << endl;
|
||||
exit( 1 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user