Article

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

Re: Exceptions vs Error codes

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

> "Barry Kelly" <✉eircom.net> wrote in message
> news:✉4ax.com...
> > There is a try..except that protects the TThread.Execute method; before
> > the application would just fall off a cliff, unless you had your own
> > one
> > in .Execute.
> 
> Ah, interesting! so does TThread have an OnException/OnError event as
> well?
> Or how do you hook into that exception handler?

You don't. It just terminates the thread.

> <snip>
> > This rare case is the only one for which an *individual* try..except
> > block is warranted.
> >
> > The others can get along with a bed-rock mechanism.
> 
> Again, this is a matter of application error handling strategy: "If you
> don't care where you are, you ain't lost".
> Kristofer

You should attach a string to a fixed object, and make sure you're able
to follow it back should you get lost; only cut it if you make it
through.

That is, program using a transactional paradigm.
-- Barry
FYI: Phrase searches are enclosed in either single or double quotes
 
 
Originally created by
Tamarack Associates
Fri, 15 Nov 2024 09:50:20 UTC
Copyright © 2009-2024
HREF Tools Corp.