X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Futil%2Ferrors.rs;h=6513beefe794e82f9651e61b55739a5f7d8b651a;hb=c52616ddd7b6ac02ed3595d10dd3190a3534c5e1;hp=f9c7f7111951fa8200c558c59dcdbdcbf13f480b;hpb=66fbc66da0c064e4ee271ad5a8e0a37410c80078;p=rust-lightning diff --git a/src/util/errors.rs b/src/util/errors.rs index f9c7f711..6513beef 100644 --- a/src/util/errors.rs +++ b/src/util/errors.rs @@ -26,6 +26,14 @@ pub enum APIError { /// A human-readable error message err: &'static str }, + + + /// We were unable to complete the request since channel is disconnected or + /// shutdown in progress initiated by remote + ChannelUnavailable { + /// A human-readable error message + err: &'static str + } } impl fmt::Debug for APIError { @@ -34,6 +42,7 @@ impl fmt::Debug for APIError { APIError::APIMisuseError {ref err} => f.write_str(err), APIError::FeeRateTooHigh {ref err, ref feerate} => write!(f, "{} feerate: {}", err, feerate), APIError::RouteError {ref err} => f.write_str(err), + APIError::ChannelUnavailable {ref err} => f.write_str(err), } } }