Article

From:
To:
Barry Kelly
Subject:
Re: Exceptions vs Error codes
Newsgroup:
borland.public.delphi.objectpascal

Re: Exceptions vs Error codes

"Barry Kelly" <✉eircom.net> wrote in message
news:✉4ax.com...
>
> And how are you going to perform this differently in the absence of
> exceptions; that is, using <.beep.> error codes and <.beep.> global
> variables, <beeeeeeeep> every second statement a check for error
> conditions?

(note: snipped [beeped!] some inflammatory passages... <g>)
atomicised operations focused on handling errors close to the source
of error (for specific handling) can do with a lower degree of
nesting. i.e.

try   op1 finally   cleanup / error handle op1 end;
try   op2 finally   cleanup / error handle op2 end;
.....
try   opN finally   cleanup / error handle opN end;
we discussed this approach before.
>
> You speak of combinatorial explosion. There are ways to fold these.
>

Surely, I've just not looked into that (performance not being my primary
argument against exception driven error handling).

Kristofer
FYI: Phrase searches are enclosed in either single or double quotes
 
 
Originally created by
Tamarack Associates
Mon, 20 May 2024 00:46:58 UTC
Copyright © 2009-2024
HREF Tools Corp.