Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion case error

Received: by 10.204.0.73 with SMTP id 9mr695261bka.4.1320896076869;
        Wed, 09 Nov 2011 19:34:36 -0800 (PST)
X-BeenThere: erlang-programming@googlegroups.com
Received: by 10.204.200.144 with SMTP id ew16ls5345071bkb.2.gmail; Wed, 09 Nov
 2011 19:34:36 -0800 (PST)
Received: by 10.204.184.2 with SMTP id ci2mr684680bkb.7.1320896076404;
        Wed, 09 Nov 2011 19:34:36 -0800 (PST)
Received: by 10.204.184.2 with SMTP id ci2mr684679bkb.7.1320896076396;
        Wed, 09 Nov 2011 19:34:36 -0800 (PST)
Return-Path: <erlang-questions-boun...@erlang.org>
Received: from hades.cslab.ericsson.net (hades.cslab.ericsson.net. [192.121.151.104])
        by gmr-mx.google.com with ESMTP id ew9si1147867bkb.3.2011.11.09.19.34.36;
        Wed, 09 Nov 2011 19:34:36 -0800 (PST)
Received-SPF: pass (google.com: domain of erlang-questions-boun...@erlang.org designates 192.121.151.104 as permitted sender) client-ip=192.121.151.104;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of erlang-questions-boun...@erlang.org designates 192.121.151.104 as permitted sender) smtp.mail=erlang-questions-boun...@erlang.org
Received: from hades.cslab.ericsson.net (hades [192.121.151.104])
	by hades.cslab.ericsson.net (Postfix) with ESMTP id D11735C056;
	Thu, 10 Nov 2011 04:34:30 +0100 (CET)
X-Original-To: erlang-questi...@erlang.org
Delivered-To: erlang-questi...@erlang.org
Received: from mailgw10.se.ericsson.net (mailgw10.se.ericsson.net
 [193.180.251.61])
 by hades.cslab.ericsson.net (Postfix) with ESMTP id 48BB45C00C
 for <erlang-questi...@erlang.org>; Thu, 10 Nov 2011 04:34:29 +0100 (CET)
X-AuditID: c1b4fb3d-b7c26ae0000035b9-bc-4ebb46449377
Received: from esessmw0184.eemea.ericsson.se (Unknown_Domain [153.88.253.124])
 by mailgw10.se.ericsson.net (Symantec Mail Security) with SMTP id
 38.AA.13753.4464BBE4; Thu, 10 Nov 2011 04:34:29 +0100 (CET)
Received: from ESESSCMS0353.eemea.ericsson.se ([169.254.1.76]) by
 esessmw0184.eemea.ericsson.se ([10.2.3.53]) with mapi; Thu, 10 Nov 2011
 04:34:28 +0100
From: =?iso-8859-1?Q?J=F3zsef_B=E9rces?= <jozsef.ber...@ericsson.com>
To: Wes James <compte...@gmail.com>, "erlang-questi...@erlang.org"
 <erlang-questi...@erlang.org>
Date: Thu, 10 Nov 2011 04:34:26 +0100
Thread-Topic: [erlang-questions] case error
Thread-Index: AcyfWPkrjPJAREmwRTCoe2faqrZt1AAAGv1w
Message-ID: <3717CEF51B134A4F8073627839A9DF4120F9256...@ESESSCMS0353.eemea.ericsson.se>
References: <CAFjCMHsBybSkfH1QUdfiEkSOXCFw=-G8+xqov4VS0WgGuPB...@mail.gmail.com>
In-Reply-To: <CAFjCMHsBybSkfH1QUdfiEkSOXCFw=-G8+xqov4VS0WgGuPB...@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
MIME-Version: 1.0
X-Brightmail-Tracker: AAAAAA==
Subject: Re: [erlang-questions] case error
X-BeenThere: erlang-questi...@erlang.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: General Erlang/OTP discussions <erlang-questions.erlang.org>
List-Unsubscribe: <http://erlang.org/mailman/options/erlang-questions>,
 <mailto:erlang-questions-requ...@erlang.org?subject=unsubscribe>
List-Archive: <http://erlang.org/pipermail/erlang-questions>
List-Post: <mailto:erlang-questi...@erlang.org>
List-Help: <mailto:erlang-questions-requ...@erlang.org?subject=help>
List-Subscribe: <http://erlang.org/mailman/listinfo/erlang-questions>,
 <mailto:erlang-questions-requ...@erlang.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: erlang-questions-boun...@erlang.org
Sender: erlang-questions-boun...@erlang.org

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-boun...@erlang.org [mailto:erlang-questions-boun...@erlang.org] On Behalf Of Wes James
Sent: Thursday, November 10, 2011 10:29
To: erlang-questi...@erlang.org
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-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions
_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions