Replace error-chain for client error (#2231)

* WIP: convert client error

* Remove error_chain for client error

* Ignore tx-pool error deprecation warning

* Update Cargo.lock files

* Fix tests

* Increment impl_version

* Derive From impls, remove allow(missing_docs)

* Remove space

* Remove redundant into()s

* Blockchain Error source

* Bump impl version
This commit is contained in:
Andrew Jones
2019-04-11 20:33:43 +01:00
committed by Bastian Köcher
parent 1e0c1d8850
commit 7f59cdb900
39 changed files with 298 additions and 290 deletions
+3 -1
View File
@@ -24,9 +24,11 @@ use crate::rpc;
use crate::errors;
error_chain! {
foreign_links {
Client(client::error::Error) #[doc = "Client error"];
}
links {
Pool(txpool::error::Error, txpool::error::ErrorKind) #[doc = "Pool error"];
Client(client::error::Error, client::error::ErrorKind) #[doc = "Client error"];
}
errors {
/// Not implemented yet
+2 -2
View File
@@ -20,8 +20,8 @@ use crate::rpc;
use crate::errors;
error_chain! {
links {
Client(client::error::Error, client::error::ErrorKind) #[doc = "Client error"];
foreign_links {
Client(client::error::Error) #[doc = "Client error"];
}
errors {
/// Not implemented yet
+2 -2
View File
@@ -20,8 +20,8 @@ use crate::rpc;
use crate::errors;
error_chain! {
links {
Client(client::error::Error, client::error::ErrorKind) #[doc = "Client error"];
foreign_links {
Client(client::error::Error) #[doc = "Client error"];
}
errors {
+1 -1
View File
@@ -44,7 +44,7 @@ fn should_call_contract() {
assert_matches!(
client.call("balanceOf".into(), Bytes(vec![1,2,3]), Some(genesis_hash).into()),
Err(Error(ErrorKind::Client(client::error::ErrorKind::Execution(_)), _))
Err(Error(ErrorKind::Client(client::error::Error::Execution(_)), _))
)
}