X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Futil%2Ferrors.rs;h=a5403ef56468e64eaefa95cc261aa6fdfbb04d23;hb=6df9129ace609bfb5c7f08ae0f41175126d05b1b;hp=1b29916e0f56b5e700032ebdff470253eb48f30b;hpb=bd2fa43acd54f9e0876d493178679dfcadf7d178;p=rust-lightning diff --git a/lightning/src/util/errors.rs b/lightning/src/util/errors.rs index 1b29916e..a5403ef5 100644 --- a/lightning/src/util/errors.rs +++ b/lightning/src/util/errors.rs @@ -1,3 +1,12 @@ +// This file is Copyright its original authors, visible in version control +// history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license +// , at your option. +// You may not use this file except in accordance with one or both of these +// licenses. + //! Error types live here. use std::fmt; @@ -9,7 +18,7 @@ pub enum APIError { /// are documented, but generally indicates some precondition of a function was violated. APIMisuseError { /// A human-readable error message - err: &'static str + err: String }, /// Due to a high feerate, we were unable to complete the request. /// For example, this may be returned if the feerate implies we cannot open a channel at the @@ -31,7 +40,7 @@ pub enum APIError { /// peer, channel at capacity, channel shutting down, etc. ChannelUnavailable { /// A human-readable error message - err: &'static str + err: String }, /// An attempt to call add/update_monitor returned an Err (ie you did this!), causing the /// attempted action to fail.