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 { try {
client.main(); client.main();
} catch ( const Network::NetworkException &e ) { } catch ( const Network::NetworkException &e ) {
fprintf( stderr, "Network exception: %s: %s\r\n", client.shutdown();
e.function.c_str(), strerror( e.the_errno ) ); throw e;
} catch ( const Crypto::CryptoException &e ) { } catch ( const Crypto::CryptoException &e ) {
fprintf( stderr, "Crypto exception: %s\r\n", client.shutdown();
e.text.c_str() ); throw e;
} }
client.shutdown(); client.shutdown();