Move ethcore::Error to error_chain (#8386)

* WIP

* Convert Ethcore error to use error_chain

* Use error_chain for ImportError and BlockImportError

* Fix error pattern matches for error_chain in miner

* Implement explicit From for AccountsError

* Fix pattern matches for ErrorKinds

* Handle ethcore error_chain in light client

* Explicitly define Result type to avoid shadowing

* Fix remaining Error pattern matches

* Fix tab space formatting

* Helps if the tests compile

* Fix error chain matching after merge
This commit is contained in:
Andrew Jones
2018-04-19 10:52:54 +01:00
committed by Afri Schoedon
parent 2257bc8e2f
commit 14361cc7b1
27 changed files with 249 additions and 274 deletions

View File

@@ -24,7 +24,7 @@ use trace::{VMTrace, FlatTrace};
use log_entry::LogEntry;
use state_diff::StateDiff;
use std::fmt;
use std::{fmt, error};
/// Transaction execution receipt.
#[derive(Debug, PartialEq, Clone)]
@@ -148,6 +148,12 @@ impl fmt::Display for ExecutionError {
}
}
impl error::Error for ExecutionError {
fn description(&self) -> &str {
"Transaction execution error"
}
}
/// Result of executing the transaction.
#[derive(PartialEq, Debug, Clone)]
pub enum CallError {