X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Futil%2Ferrors.rs;h=66ddf84d96871857ed027cc5c3c74f3bfb749dfb;hb=e86e10b87d8e0fe8631558dd61aee4cc77f50bde;hp=6513beefe794e82f9651e61b55739a5f7d8b651a;hpb=a82a5f71dac03181145e78c90145e8a036fac2c5;p=rust-lightning diff --git a/src/util/errors.rs b/src/util/errors.rs index 6513beef..66ddf84d 100644 --- a/src/util/errors.rs +++ b/src/util/errors.rs @@ -20,20 +20,22 @@ pub enum APIError { /// The feerate which was too high. feerate: u64 }, - - /// Invalid route or parameters (cltv_delta, fee, pubkey) was specified + /// A malformed Route was provided (eg overflowed value, node id mismatch, overly-looped route, + /// too-many-hops, etc). RouteError { /// 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 + /// We were unable to complete the request as the Channel required to do so is unable to + /// complete the request (or was not found). This can take many forms, including disconnected + /// peer, channel at capacity, channel shutting down, etc. ChannelUnavailable { /// A human-readable error message err: &'static str - } + }, + /// An attempt to call add_update_monitor returned an Err (ie you did this!), causing the + /// attempted action to fail. + MonitorUpdateFailed, } impl fmt::Debug for APIError { @@ -43,6 +45,7 @@ impl fmt::Debug for APIError { 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), + APIError::MonitorUpdateFailed => f.write_str("Client indicated a channel monitor update failed"), } } }