From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: request for review: Doing direct file I/O in Emacs Lisp Date: Mon, 10 May 2004 13:23:12 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1084211111 17783 80.91.224.253 (10 May 2004 17:45:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 10 May 2004 17:45:11 +0000 (UTC) Cc: johnw@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon May 10 19:44:45 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BNEpY-00019W-00 for ; Mon, 10 May 2004 19:44:44 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BNEpS-0006vP-00 for ; Mon, 10 May 2004 19:44:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.33) id 1BN9yP-0005t0-PW for emacs-devel@quimby.gnus.org; Mon, 10 May 2004 08:33:33 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.33) id 1BN9Y7-0003Ds-Ah for emacs-devel@gnu.org; Mon, 10 May 2004 08:06:23 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.33) id 1BN9K9-0001iD-DR for emacs-devel@gnu.org; Mon, 10 May 2004 07:52:28 -0400 Original-Received: from [195.135.220.2] (helo=Cantor.suse.de) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.33) id 1BN8sO-0006WH-OC; Mon, 10 May 2004 07:23:17 -0400 Original-Received: from hermes.suse.de (Hermes.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id 4DA49582864; Mon, 10 May 2004 13:23:14 +0200 (CEST) Original-To: Eli Zaretskii X-Yow: The PILLSBURY DOUGHBOY is CRYING for an END to BURT REYNOLDS movies!! In-Reply-To: (Eli Zaretskii's message of "10 May 2004 13:29:17 +0200") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:23053 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23053 Eli Zaretskii writes: >> From: Andreas Schwab >> Date: Mon, 10 May 2004 11:38:09 +0200 >>=20 >> You should signal an error instead of just returning nil. > > Why? Shouldn't this be up to a higher level of code, the one that > calls file-handle-open, and knows what it is going to do with the > handle? How can you find out which error happend? There are already three different cases where the function just returns nil, and the caller would have to repeat the very same tests to find out which error path was taken= . Argument type checks should just use CHECK_FOO. Andreas. --=20 Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Maxfeldstra=DFe 5, 90409 N=FCrnberg, Germany Key fingerprint =3D 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."