mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-09 09:27:59 +00:00
node: exit on GRANDPA voter or BABE authoring error (#3353)
* node: exit on GRANDPA voter or BABE authoring error * node: exit process with non-zero return code when service fails * service: rename infallible task to essential task * service: revert field name changes * core: fix service testnet
This commit is contained in:
committed by
Robert Habermeier
parent
09b57261df
commit
70d716dc48
@@ -36,7 +36,17 @@ pub enum Error {
|
||||
Input(String),
|
||||
/// Invalid listen multiaddress
|
||||
#[display(fmt="Invalid listen multiaddress")]
|
||||
InvalidListenMultiaddress
|
||||
InvalidListenMultiaddress,
|
||||
/// Other uncategorized error.
|
||||
Other(String),
|
||||
}
|
||||
|
||||
/// Must be implemented explicitly because `derive_more` won't generate this
|
||||
/// case due to conflicting derive for `Other(String)`.
|
||||
impl std::convert::From<String> for Error {
|
||||
fn from(s: String) -> Error {
|
||||
Error::Input(s)
|
||||
}
|
||||
}
|
||||
|
||||
impl std::error::Error for Error {
|
||||
@@ -48,6 +58,7 @@ impl std::error::Error for Error {
|
||||
Error::Client(ref err) => Some(err),
|
||||
Error::Input(_) => None,
|
||||
Error::InvalidListenMultiaddress => None,
|
||||
Error::Other(_) => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user