Merge branch 'master' of github.com:paritytech/parity into util_error_chain

This commit is contained in:
debris
2017-09-05 12:38:15 +02:00
15 changed files with 307 additions and 3 deletions

View File

@@ -83,6 +83,8 @@ pub enum TransactionError {
CodeBanned,
/// Invalid chain ID given.
InvalidChainId,
/// Not enough permissions given by permission contract.
NotAllowed,
}
impl fmt::Display for TransactionError {
@@ -107,6 +109,7 @@ impl fmt::Display for TransactionError {
RecipientBanned => "Recipient is temporarily banned.".into(),
CodeBanned => "Contract code is temporarily banned.".into(),
InvalidChainId => "Transaction of this chain ID is not allowed on this chain.".into(),
NotAllowed => "Sender does not have permissions to execute this type of transction".into(),
};
f.write_fmt(format_args!("Transaction error ({})", msg))