summaryrefslogtreecommitdiff
path: root/src/remote.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2016-12-20 10:34:48 +0000
committerMaxime Coste <mawww@kakoune.org>2016-12-20 10:34:48 +0000
commitb7a0aa7546e6e6cbc18662d41ae352a83dff348f (patch)
tree1b27bbe6a66a45b5944e733e3bde784fd4862d91 /src/remote.hh
parent4b696836d1516587812b6ce51f41ed825b26e7e8 (diff)
Ensure we return 0 on exit from graceful disconnection
Fixes #1042
Diffstat (limited to 'src/remote.hh')
-rw-r--r--src/remote.hh7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/remote.hh b/src/remote.hh
index 6aaac49d..111a4973 100644
--- a/src/remote.hh
+++ b/src/remote.hh
@@ -11,9 +11,12 @@
namespace Kakoune
{
-struct remote_error : runtime_error
+struct disconnected : runtime_error
{
- using runtime_error::runtime_error;
+ disconnected(String what, bool graceful = false)
+ : runtime_error{std::move(what)}, m_graceful{graceful} {}
+
+ const bool m_graceful;
};
class FDWatcher;