[erlang-questions] badarg, function_exported

Sam Elliott <>
Mon Aug 1 16:29:14 CEST 2011


Have you defined your own behaviour, but not used atoms and integers in the
list of tuples like so? It looks like the arity argument you are giving it
is all messed up, it should be an integer not a tuple/record.

behaviour_info(callbacks) ->
  [{init,1}, ... ]

It might also be worth checking where you define any modules to look for
callbacks in, such as when you start a gen_server. I expect if that isn't an
atom, erlang will complain.

Sam

--
Sam Elliott

--


On Mon, Aug 1, 2011 at 3:15 PM, Joel Reymont <> wrote:

> It always helps to ask!
>
> The problem here is that erlang:function_exported is getting a bad
> argument.
>
> On Aug 1, 2011, at 3:02 PM, Joel Reymont wrote:
>
> > What is this telling me?
> >
> > Is a function not exported and if so which function?
> >
> > Is it game_logic_stack:game?
> >
> >       Thanks, Joel
> >
> > ---
> > (<0.526.0>) error_logger ! {notify,
> >                            {error_report,<0.479.0>,
> >                             {<0.526.0>,crash_report,
> >                              [[{pid,<0.526.0>},
> >                                {registered_name,[]},
> >                                {error_info,
> >                                 {error,badarg,
> >                                  [{erlang,function_exported,
> >                                    [{game_logic_stack,game,
> >
>  {texas,none,none,none,false,false,0,0,
>
> --------------------------------------------------------------------------
> - for hire: mac osx device driver ninja, kernel extensions and usb drivers
> ---------------------+------------+---------------------------------------
> http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
> ---------------------+------------+---------------------------------------
>
>
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110801/20b02964/attachment.html>


More information about the erlang-questions mailing list