emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: request for review: Doing direct file I/O in Emacs Lisp


From: Andreas Schwab
Subject: Re: request for review: Doing direct file I/O in Emacs Lisp
Date: Mon, 10 May 2004 13:23:12 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> From: Andreas Schwab <address@hidden>
>> Date: Mon, 10 May 2004 11:38:09 +0200
>> 
>> 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.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]