[erlang-questions] Badmatch doesn't propage up in an application?

Robert Virding <>
Fri Oct 31 11:41:20 CET 2008


A corollary to Adam's reply is that to get the Listen value you seem to
want, and which I assume you got before, you should change the code to:

    {ok,Listen} = hydralib:get_first_arg(listen),

Robert

2008/10/31 Adam Lindberg <>

> On Fri, Oct 31, 2008 at 07:33, Kevin <> wrote:
>
>> In this lib file there's badmatch error certain to happen.
>>
>> Listen = hydralib:get_first_arg(listen),
>>
>> get_first_arg actually returns {ok, Listen}.  This was a very recent
>> rewrite.
>>
>
> Is Listen bound at the time? If it's not, then there will be no bad match
> there.
>
> Cheers,
> Adam
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20081031/49d3eb90/attachment.html>


More information about the erlang-questions mailing list