[ejabberd] error: {case_clause,undefined}

Holger Weiß holger at zedat.fu-berlin.de
Sun Mar 1 15:55:06 MSK 2015

* Gaurav Jain <monkeyfdude at gmail.com> [2015-03-01 01:44]:
> It seemed to have moved forward if I use
>    IQDisc = gen_mod:get_opt(iqdisc, Opt, fun gen_iq_handler:check_type/1,
>                              one_queue),
> instead of
>     IQDisc = gen_mod:get_opt(iqdisc, Opt, one_queue),

Yes, in recent ejabberd releases, the gen_mod:get_opt function has been
changed to take a function that parses the configuration option.

> Would you be able to give pointers on this please?

What you did should work, assuming the "Opt" variable holds the options
of your module.

In general, I'd recommend looking at other current modules¹ to see how
they handle these things.

Good luck, Holger

¹ https://github.com/processone/ejabberd-contrib

More information about the ejabberd mailing list