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

Roger Critchlow rec@REDACTED
Fri Oct 31 20:10:50 CET 2008


You want to start erlang with sasl to get the complete blow-by-blow
commentary on your program's life and death.

    erl -boot start_sasl ...

The mismatch report will be in there.

-- rec --


On Fri, Oct 31, 2008 at 11:47 AM, Kevin <q2h46uw02@REDACTED> wrote:

>
> Sorry, I meant "propagate" of course.  Thats what happens when you cant
> sleep because of a problem, get back out of bed and post to a list.
>
> I'm very sure the problem is because of a bad match, because I can run
> that code without the application and it gives me a badmatch error.
> I also changed the function to return {ok, string} rather than just
> string, and, I actually fixed the problem by changing the code to {ok,
> Listen}
>
>
> Should I just assume that exceptions way down the "application stack"
> don't rise up to the level where they can be seen?  Thats a scary thought.
>
> -ks
>
>
>
>
> Robert Virding rvirding-at-gmail.com |erlang| wrote:
> > 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 <adam@REDACTED
> > <mailto:adam@REDACTED>>
> >
> >     On Fri, Oct 31, 2008 at 07:33, Kevin <q2h46uw02@REDACTED
> >     <mailto:q2h46uw02@REDACTED>> 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
> >     erlang-questions@REDACTED <mailto:erlang-questions@REDACTED>
> >     http://www.erlang.org/mailman/listinfo/erlang-questions
> >
> >
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20081031/b1efb22d/attachment.htm>


More information about the erlang-questions mailing list