mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 05:41:07 +00:00
introduce errors with info (#1834)
This commit is contained in:
committed by
GitHub
parent
40ea09389c
commit
f345123748
@@ -5,7 +5,6 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
derive_more = "0.99.9"
|
||||
futures = "0.3.5"
|
||||
log = "0.4.8"
|
||||
polkadot-erasure-coding = { path = "../../erasure-coding" }
|
||||
@@ -14,6 +13,7 @@ polkadot-node-subsystem = { path = "../subsystem" }
|
||||
polkadot-node-subsystem-util = { path = "../subsystem-util" }
|
||||
polkadot-primitives = { path = "../../primitives" }
|
||||
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
thiserror = "1.0.21"
|
||||
|
||||
[dev-dependencies]
|
||||
polkadot-node-subsystem-test-helpers = { path = "../subsystem-test-helpers" }
|
||||
|
||||
@@ -14,19 +14,20 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use thiserror::Error;
|
||||
|
||||
#[derive(Debug, derive_more::From)]
|
||||
#[derive(Debug, Error)]
|
||||
pub enum Error {
|
||||
#[from]
|
||||
Subsystem(polkadot_node_subsystem::SubsystemError),
|
||||
#[from]
|
||||
OneshotRecv(futures::channel::oneshot::Canceled),
|
||||
#[from]
|
||||
Runtime(polkadot_node_subsystem::errors::RuntimeApiError),
|
||||
#[from]
|
||||
Util(polkadot_node_subsystem_util::Error),
|
||||
#[from]
|
||||
Erasure(polkadot_erasure_coding::Error),
|
||||
#[error(transparent)]
|
||||
Subsystem(#[from] polkadot_node_subsystem::SubsystemError),
|
||||
#[error(transparent)]
|
||||
OneshotRecv(#[from] futures::channel::oneshot::Canceled),
|
||||
#[error(transparent)]
|
||||
Runtime(#[from] polkadot_node_subsystem::errors::RuntimeApiError),
|
||||
#[error(transparent)]
|
||||
Util(#[from] polkadot_node_subsystem_util::Error),
|
||||
#[error(transparent)]
|
||||
Erasure(#[from] polkadot_erasure_coding::Error),
|
||||
}
|
||||
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
Reference in New Issue
Block a user