From: lisch.at.tempest-sw.com@nojunkmail.com (Ray Lischner) Subject: Re: Which is better: IOResult or Exception ? Date: 22 Feb 2000 00:00:00 GMT Message-ID: <6bWyONMKbcbo+ktyI38ZCTLBm+mY@4ax.com> Content-Transfer-Encoding: 7bit References: <88tf8d$f9e$1@nnrp1.deja.com> Organization: Tempest Software, Inc., Corvallis, Oregon Content-Type: text/plain; charset=us-ascii MIME-Version: 1.0 Newsgroups: comp.lang.pascal.delphi.misc X-Complaints-To: newsabuse@supernews.com On Tue, 22 Feb 2000 07:52:45 GMT, Eric Hurtebis wrote: >When working with files, is it now better to continue using >{$I-} and IOResult >or use the new possibilities of Exceptions handlers ? >(which one is "cleaner" ?) Exceptions. >In the 2nd case, can we still get the old IOResult values (or >equivalent) (100 to 106) to determine the cause of the failure ? Yes. The EInOutError class has an ErrorCode field. Note that the error code can be any Windows error code, in addition to 100..106. The default Message property for EInOutError does not always fetch the Windows error message text, so you should do that yourself when you handle an EInOutError exception. -- Ray Lischner, http://www.tempest-sw.com/nutshell author of Delphi in a Nutshell