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:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user