[fpc-devel] Exceptions in threads

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Dec 10 22:20:28 CET 2008


On 10 Dec 2008, at 22:12, Luca Olivetti wrote:

> En/na Mattias Gärtner ha escrit:
>> I'm writing a unit to simplify parallel methods/procedures.
>> For example:
>>  DoParallel(@AMethod,StartIndex,EndIndex,Data);
>> The AMethod is executed with several threads in parallel.
>> What should happen when an exception occurs?
>
> AFAIK any unhandled exception in a thread will cause it to silently  
> die

The exception can be recovered using the tthread.fatalexception  
property.


Jonas


More information about the fpc-devel mailing list