diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2016-11-29 19:12:56 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2016-11-29 19:52:57 +0000 |
| commit | 0dff8a7d3f0da388a6327ba9c797691ae855312f (patch) | |
| tree | f11b4f0a1812edf66a10d4320523d8c86f58684d /src/main.cc | |
| parent | db86c6cbc953a9168eeda629214bcb52a175cd33 (diff) | |
Small remote code cleanup
Diffstat (limited to 'src/main.cc')
| -rw-r--r-- | src/main.cc | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/main.cc b/src/main.cc index f522c088..5dc28d5c 100644 --- a/src/main.cc +++ b/src/main.cc @@ -465,14 +465,9 @@ int run_client(StringView session, StringView init_command, UIType ui_type) while (true) event_manager.handle_next_events(EventMode::Normal); } - catch (remote_error&) + catch (remote_error& e) { - write_stderr("disconnected from server\n"); - return -1; - } - catch (connection_failed& e) - { - write_stderr(format("{}\n", e.what())); + write_stderr(format("{}\ndisconnecting\n", e.what())); return -1; } return 0; @@ -713,9 +708,9 @@ int run_pipe(StringView session) { send_command(session, command); } - catch (connection_failed& e) + catch (remote_error& e) { - write_stderr(format("{}\n", e.what())); + write_stderr(format("{}\ndisconnecting\n", e.what())); return -1; } return 0; |
