Skip to content
Snippets Groups Projects
Commit db7fdce9 authored by Keith Yeung's avatar Keith Yeung Committed by GitHub
Browse files

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
parent c995f6c7
No related merge requests found
......@@ -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;
......
......@@ -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]
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment