error rework, for polkadot convenience (#7446)

Co-authored-by: Bernhard Schuster <bernhard@parity.io>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Bernhard Schuster
2020-10-28 15:04:56 +01:00
committed by GitHub
parent 1679919830
commit 9687759774
17 changed files with 152 additions and 128 deletions
+2 -2
View File
@@ -19,7 +19,7 @@ parking_lot = { version = "0.10.0", optional = true }
sp-std = { version = "2.0.0", default-features = false, path = "../std" }
sp-core = { version = "2.0.0", default-features = false, path = "../core" }
codec = { package = "parity-scale-codec", version = "1.3.1", default-features = false, features = ["derive"] }
derive_more = { version = "0.99.2", optional = true }
thiserror = { version = "1.0.21", optional = true }
[features]
default = [ "std" ]
@@ -28,5 +28,5 @@ std = [
"sp-std/std",
"codec/std",
"sp-core/std",
"derive_more",
"thiserror",
]
+2 -1
View File
@@ -46,7 +46,8 @@ use std::{sync::Arc, format};
/// An error that can occur within the inherent data system.
#[cfg(feature = "std")]
#[derive(Debug, Encode, Decode, derive_more::Display)]
#[derive(Debug, Encode, Decode, thiserror::Error)]
#[error("Inherents: {0}")]
pub struct Error(String);
#[cfg(feature = "std")]