Article

From:
To:
Kristofer Skaug
Subject:
Re: Exceptions vs Error codes
Newsgroup:
borland.public.delphi.objectpascal

Re: Exceptions vs Error codes

"Kristofer Skaug" <✉satserv.nl> wrote in message
news:3b778917_2@dnews...
> "Greg Lorriman" <✉bigfoot.com> wrote in message
> news:3b770d27_2@dnews...
> >
> > It's supposed to cover the unexpected which means
> > that for which your program cannot be reasonably expected to cope. A
> user
> > providing a path to a non-existent file, for example, or an
> alphanummeric
> > string where a number is required.
> >
>
> Basically what you are saying is that the "threshold" for generating
> exceptions is the allotted development budget. Complete error handling

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.

Greg
FYI: Phrase searches are enclosed in either single or double quotes
 
 
Originally created by
Tamarack Associates
Thu, 28 Mar 2024 18:08:01 UTC
Copyright © 2009-2024
HREF Tools Corp.