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

Kevin q2h46uw02@REDACTED
Fri Oct 31 18:47:06 CET 2008

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, 

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.


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

More information about the erlang-questions mailing list