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:
Geoffrey Thomas
2013-08-03 17:23:06 -07:00
committed by John Hood
parent aeffb71cfc
commit b5ac92491c
2 changed files with 10 additions and 9 deletions
+2 -2
View File
@@ -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" );