Throw std::exception subclasses instead of std::strings
Now everything we throw or catch ourselves is a subclass of std::exception.
This commit is contained in:
committed by
John Hood
parent
aeffb71cfc
commit
b5ac92491c
@@ -181,8 +181,8 @@ int main( int argc, char *argv[] )
|
||||
} catch ( const Crypto::CryptoException &e ) {
|
||||
fprintf( stderr, "Crypto exception: %s\r\n",
|
||||
e.what() );
|
||||
} catch ( const std::string &s ) {
|
||||
fprintf( stderr, "Error: %s\r\n", s.c_str() );
|
||||
} catch ( const std::exception &e ) {
|
||||
fprintf( stderr, "Error: %s\r\n", e.what() );
|
||||
}
|
||||
|
||||
printf( "\n[mosh is exiting.]\n" );
|
||||
|
||||
Reference in New Issue
Block a user