[erlang-questions] case error
Wes James
comptekki@REDACTED
Thu Nov 10 04:44:15 CET 2011
Argh - you are right, there is a Data above that - Thanks!
I kept thinking the structure of this didn't seem wrong.
Thanks again,
-wes
2011/11/9 József Bérces <jozsef.berces@REDACTED>:
> Hi Wes,
>
> I would suspect that you assigned some value to the variable Data in the same function earlier. So now it does not match the info read from the file.
>
> BR,
> Jozsef
>
> -----Original Message-----
> From: erlang-questions-bounces@REDACTED [mailto:erlang-questions-bounces@REDACTED] On Behalf Of Wes James
> Sent: Thursday, November 10, 2011 10:29
> To: erlang-questions@REDACTED
> Subject: [erlang-questions] case error
>
> I have a case like this:
>
> case file:read_file(Args) of
> {ok, Data} ->
> ...;
> {error, Reason} ->
> ....
> end;
>
> but when I run the code I get:
>
>
> exit value: {{case_clause,{ok,<<524 bytes>>}},[{module,fun,1}]}
>
> What am I doing wrong here?
>
> thanks,
>
> -wes
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
More information about the erlang-questions
mailing list