🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #2300

Re: Behaviour of a crashing TThread

#2300
From: Goran Ekstrom
Date: Fri, 09 Mar 2007 23:14
30 lines
1871 bytes
Excellent, thanks Remy.

Goran

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> skrev i meddelandet 
news:45ede2e2$1@newsgroups.borland.com...
>
> "Goran Ekstrom" <goek!removeantispam!@telia.com> wrote in message
> news:45edd2bc$1@newsgroups.borland.com...
>
>> I seem to remember that a crashing TThread does not pop up
>> the familiar "Application problem" message box but just silently
>> "dies" in the background. Correct?
>
> Yes, that is correct.
>
>> If so, how do you catch crashes in threads?
>
> Wrap your Exceute() code with a try..catch block.  If you are using
> BCB 6+, you can alternatively override the virtual DoTerminate()
> method and check if the thread's FatalException property is NULL or
> not.  If you are using BCB 5 or earlier, you can still override
> DoTerminate(), but there is no FatalException property, so you would
> need to use your own variable that Execute() can set if it exits
> gracefully.
>
>
> Gambit
>
> 
Technical Details
Message-ID: <45f1ea23@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <45edd2bc$1@newsgroups.borland.com> <45ede2e2$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,145ba2b5cddc00ba
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Goran Ekstrom" <goek!removeantispam!@telia.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <45edd2bc$1@newsgroups.borland.com> <45ede2e2$1@newsgroups.borland.com>
Subject: Re: Behaviour of a crashing TThread
Date: Sat, 10 Mar 2007 00:14:10 +0100
Lines: 32
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 217.213.148.138
Message-ID: <45f1ea23@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1173482019 217.213.148.138 (9 Mar 2007 15:13:39 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail