mosh-client: Print exceptions after the client is shut down

Otherwise the printed exception may be immediately hidden when the
terminal exits alternate screen mode.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg
2013-08-17 08:23:21 -04:00
parent 45bba44c83
commit 9187e307c6
+4 -4
View File
@@ -176,11 +176,11 @@ int main( int argc, char *argv[] )
try {
client.main();
} catch ( const Network::NetworkException &e ) {
fprintf( stderr, "Network exception: %s: %s\r\n",
e.function.c_str(), strerror( e.the_errno ) );
client.shutdown();
throw e;
} catch ( const Crypto::CryptoException &e ) {
fprintf( stderr, "Crypto exception: %s\r\n",
e.text.c_str() );
client.shutdown();
throw e;
}
client.shutdown();