[DUG] Program crashes - anyone knows why?
Conor Boyd
Conor.Boyd at trimble.co.nz
Mon Nov 27 09:52:34 NZDT 2006
I didn't say they propagated to your main thread. ;-) I said you
shouldn't let them propagate out of your thread.
If you get an unhandled exception in the Execute method of your thread,
it'll try to propagate somewhere else.
But there isn't anywhere for it to go.
You should definitely have one big try-except block around the whole of
your Execute to catch everything.
You could well be on to something with your VCL synchronisation
suggestion tho'.
Cheers,
C.
-----Original Message-----
From: delphi-bounces at ns3.123.co.nz [mailto:delphi-bounces at ns3.123.co.nz]
On Behalf Of Matthew Comb
Exceptions within a thread shouldn't propogate to the main thread unless
im missing something?
Matt.
> Thanks Conor, I've added (A) and sent the application to the client,
> so let's hope there will be some progress.
>
>
> On Sun, 26 Nov 2006 20:35:38 +0100, Conor Boyd
> <Conor.Boyd at trimble.co.nz>
> wrote:
>
>> That's a very detailed email... ;-)
>>
>> Without delving deeper, I've a couple of comments/suggestions.
>>
>> A) You definitely need a try-except block in your Execute method.
>> You must not let unhandled exceptions propagate out of a thread.
>> Even if you only put a call to OutputDebugString in your exception
>> handler, then that means you could use e.g. DebugView from
>> Sysinternals to view exceptions being thrown.
[snip]
More information about the Delphi
mailing list