Add interrupt error kind

This commit is contained in:
Roman Zeyde 2018-07-29 09:39:29 +03:00
parent 3f9f6e6330
commit ea39632523
No known key found for this signature in database
GPG Key ID: 87CAE5FA46917CBB

View File

@ -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)
}
}
}