Introduce ModuleError struct (#10776)

* better partial eq impl

* introduce module error

* fmt

* import module error

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* fixes

* fmt

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Shawn Tabrizi
2022-02-03 14:02:45 +01:00
committed by GitHub
parent 99fae0cd57
commit 21d0cf0eea
9 changed files with 84 additions and 77 deletions
+2 -2
View File
@@ -153,11 +153,11 @@ macro_rules! decl_error {
::index::<$module<$generic $(, $inst_generic)?>>()
.expect("Every active module has an index in the runtime; qed") as u8;
$crate::sp_runtime::DispatchError::Module {
$crate::sp_runtime::DispatchError::Module($crate::sp_runtime::ModuleError {
index,
error: err.as_u8(),
message: Some(err.as_str()),
}
})
}
}
};