[erlang-questions] Cryptic error messages

orbitz@REDACTED orbitz@REDACTED
Wed Mar 26 21:49:12 CET 2008


The first = binds 5 to M.  The second one attempts to mach 5 and 6,  
which does not work, thus a badmatch exception.  Remeber, variables  
are immutable in Erlang. you can do f(M) in order to lose the M  
definition.


On Mar 26, 2008, at 4:42 PM, <Will.Irwin@REDACTED> wrote:
> I am running 1:11b5 on Ubuntu (that's the latest version in  
> Ubuntu's package management system, though I see there is a 1:12  
> out now).
>
> I am getting really cryptic messages in response to any error that  
> I make.
>
> For example:
>
> (ping@REDACTED)1> M = 5.
> 5
> (ping@REDACTED)2> M = 6.
>
> =ERROR REPORT==== 26-Mar-2008::14:01:34 ===
> Error in process <0.37.0> on node 'ping@REDACTED' with exit  
> value: {{badmatch,6},[{erl_eval,expr,3}]}
>
> ** exited: {{badmatch,6},[{erl_eval,expr,3}]} **
>
> Huh?
>
> ... whereas from reading the Getting Started with Erlang tutorial,  
> I was expecting a message like:
>
> ** exception error: no match of right hand side value 6
>
> Am I doing something wrong, or is this the way it is in the version  
> I have?
>
> (For my second day running Erlang, error messages like this are not  
> exactly helping my learning curve <image001.gif>)
>
> <image001.gif>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list