ChannelManager support for monitor update failure in one place
[rust-lightning] / src / util / errors.rs
index 9446b35854baf9e34f665d3e1755ab7f599c4992..66ddf84d96871857ed027cc5c3c74f3bfb749dfb 100644 (file)
@@ -32,7 +32,10 @@ pub enum APIError {
        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 {
@@ -42,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"),
                }
        }
 }