Kristofer Skaug
Re: Exceptions vs Error codes

Re: Exceptions vs Error codes

In article <3b7d95ac_2@dnews>
	"Kristofer Skaug" <✉> wrote:

> "Barry Kelly" <✉> wrote in message
> news:✉
> >
> > 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
Tue, 07 Feb 2023 05:53:04 UTC
Copyright © 2009-2023
HREF Tools Corp.