From ea3963252398c5300205ef2ac327f1c21e3497a5 Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Sun, 29 Jul 2018 09:39:29 +0300 Subject: [PATCH] Add interrupt error kind --- src/errors.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/errors.rs b/src/errors.rs index 7fda165..540945c 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -1,3 +1,5 @@ +use chan_signal::Signal; + error_chain!{ types { Error, ErrorKind, ResultExt, Result; @@ -8,5 +10,10 @@ error_chain!{ description("Connection error") display("Connection error: {}", msg) } + + Interrupt(signal: Signal) { + description("Interruption by external signal") + display("Iterrupted by SIG{:?}", signal) + } } }