Article

From:
To:
Greg Lorriman
Subject:
Re: Exceptions vs Error codes
Newsgroup:
borland.public.delphi.objectpascal

Re: Exceptions vs Error codes


"Greg Lorriman" <✉bigfoot.com> wrote in message
news:3b781c99_2@dnews...
> Absolutely not! I am saying that it is unreasonable for MS Word to do
> anything other than abort if the user provides a false path in the open
> dialog. What is the programmer supposed to do? Is he supposed to attempt to
> find a file whose soundex is similar? That would be unreasonable. There is
> no reasonable contigency and it's obvious that user intervention is needed.
> This situation is asking for an exception.

? it is? if your program just detects that no such file (as specified) is
present or valid, all it needs to do is display an error message and offer
the user a chance to specify another filename (or quit). I would tend to see
this as part of the anticipated behaviour of a function (and the user
input), not as an exceptional case (SNAFU, idiot users, etc.).

Kristofer
FYI: Phrase searches are enclosed in either single or double quotes
 
 
Originally created by
Tamarack Associates
Fri, 22 Nov 2024 16:57:41 UTC
Copyright © 2009-2024
HREF Tools Corp.