Kristofer Skaug
Re: Exceptions vs Error codes

Re: Exceptions vs Error codes

In article <3b78e505_1@dnews>
	"Kristofer Skaug" <‚úČ> wrote:

> What I mean here, is not that you *can't* contain exceptions (because
> you *can*, by catching them early); however, exceptions are inherently
> mechanisms of error propagation, and the programming style associated
> with this mechanism encourages such propagation.

Exceptions are mechanisms of error *information* propagation. They do
not increase error. They do not spread error. "Error propagation" is an
incorrect term. They are a mechanism for transactional-style
programming. Thought must be applied along with try..finally constructs
to provide roll-back ability.

> In my line of business (spacecraft and ground systems), failure
> detection, isolation, containment and recovery is the highest good.

> Any fault propagation is considered evil and should be constrained to
> the maximum possible extent (note: I am talking about propagation of
> the error *condition*, not about error *messages*).

Good. Then you shouldn't be opposed to exceptions, because exceptions is
a means of propagation of error information, not an error condition.

> Writing an
> exception-based program is contrary to this principle.

You are wrong.

-- Barry
--   If you're not part of the solution, you're part of the precipitate. Team JEDI: NNQ - Quoting Style in Newsgroup Postings
FYI: Phrase searches are enclosed in either single or double quotes
Originally created by
Tamarack Associates
Tue, 07 Feb 2023 04:57:06 UTC
Copyright © 2009-2023
HREF Tools Corp.