mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-23 00:18:00 +00:00
9db5a39013
* substrate runner: dump CLI output parsing fails * cargo fmt * Update testing/substrate-runner/src/lib.rs * fix grumbles * disable flaky test * ignore reconn test too * ignore more tests * fix tests * improve log parsing * Update testing/integration-tests/src/full_client/client/unstable_rpcs.rs * Update testing/integration-tests/src/full_client/client/unstable_rpcs.rs * fix nits * fix reconn test
34 lines
1.1 KiB
Rust
34 lines
1.1 KiB
Rust
// Copyright 2019-2023 Parity Technologies (UK) Ltd.
|
|
// This file is dual-licensed as Apache-2.0 or GPL-3.0.
|
|
// see LICENSE for license details.
|
|
|
|
#[derive(Debug)]
|
|
pub enum Error {
|
|
Io(std::io::Error),
|
|
CouldNotExtractPort(String),
|
|
CouldNotExtractP2pAddress(String),
|
|
CouldNotExtractP2pPort(String),
|
|
}
|
|
|
|
impl std::fmt::Display for Error {
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
match self {
|
|
Error::Io(err) => write!(f, "IO error: {err}"),
|
|
Error::CouldNotExtractPort(log) => write!(
|
|
f,
|
|
"could not extract port from running substrate node's stdout: {log}"
|
|
),
|
|
Error::CouldNotExtractP2pAddress(log) => write!(
|
|
f,
|
|
"could not extract p2p address from running substrate node's stdout: {log}"
|
|
),
|
|
Error::CouldNotExtractP2pPort(log) => write!(
|
|
f,
|
|
"could not extract p2p port from running substrate node's stdout: {log}"
|
|
),
|
|
}
|
|
}
|
|
}
|
|
|
|
impl std::error::Error for Error {}
|