Article

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

Re: Exceptions vs Error codes

In article <3b7d95ac_2@dnews>
	"Kristofer Skaug" <✉skaug.demon.nl> wrote:

> "Barry Kelly" <✉eircom.net> wrote in message
> news:✉4ax.com...
> >
> > The main reason why I'm in favour of exceptions is the
> > same reason I'm in favour of democracy; it's pretty miserable, but it's
> > the best thing we've found so far.
> 
> <G> to me, error codes and exceptions are like democracy and
> dictatorship, in that order.

I'm afraid I'm the reverse; exceptions *force* you to consider the
possibility of errors. Error codes are optional; an awful lot of code
can be written without regard for the error codes returned, and thus
will continue on blithely unaware of error conditions, mucking up state,
causing instability that isn't detected possibly for days, leading to
lots of $$$ loss.

The prospect worries me; give me exceptions any day.
-- Barry
FYI: Phrase searches are enclosed in either single or double quotes
 
 
Originally created by
Tamarack Associates
Thu, 28 Mar 2024 08:21:11 UTC
Copyright © 2009-2024
HREF Tools Corp.