Declare Error type in decl_module! (#390)

* Declare Error type in decl_module! for parachain-systems

* Declare Error type in decl_module! for xcm-handler
This commit is contained in:
Keith Yeung authored and GitHub committed 2021-04-07 11:38:41 +02:00
1 parent 1d4c02cc4e
commit cbd72e7ab8
2 files changed
+4

No files matched your search

+2
View File
@@ -140,6 +140,8 @@ decl_storage! {
// The pallet's dispatchable functions.
decl_module! {
pub struct Module<T: Config> for enum Call where origin: T::Origin {
type Error = Error<T>;
// Initializing events
// this is needed only if you are using events in your pallet
fn deposit_event() = default;
+2
View File
@@ -79,6 +79,8 @@ decl_error! {
decl_module! {
pub struct Module<T: Config> for enum Call where origin: T::Origin {
type Error = Error<T>;
fn deposit_event() = default;
#[weight = 1_000]