[erlang-questions] function badarg

Dmitry Demeshchuk demeshchuk@REDACTED
Tue Jul 5 14:28:29 CEST 2011


Use proc_lib:spawn_link instead of erlang:spawn_link. That's possibly
the easiest way.

On Tue, Jul 5, 2011 at 4:27 PM, Alexander Kuleshov
<kuleshovmail@REDACTED> wrote:
> Hello,
>
> I have loop/2 function. This is main cycle of processing input data.
>
> Approximate form of this function:
>
> loop(Session, State) ->
>  {1} ->
>        .....
>       loop(Session, State);
> {2} ->
>        .....
>       loop(Session, State);
> {3} ->
>        .....
>       loop(Session, State);
> _ ->
>     loop(Session, State).
>
> In fact, this function big. Something about 1000 string of code.
>
> Sometimes this function crash with: Error in process <0.384.0> on node
> 'test@REDACTED' with exit value: {badarg,[{test,loop,2}]}
>
> Is there instruments or methods to know where it occurs and how it can
> catch this?
>
> Thank you.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>



-- 
Best regards,
Dmitry Demeshchuk



More information about the erlang-questions mailing list