Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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>
  • Loading branch information...
commit 9187e307c60fe0ef58d3a1cf68228675a13349bf 1 parent 45bba44
@andersk andersk authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/frontend/mosh-client.cc
View
8 src/frontend/mosh-client.cc
@@ -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();
Please sign in to comment.
Something went wrong with that request. Please try again.