[fpc-devel] Exceptions in threads

Vincent Snijders vsnijders at vodafonevast.nl
Thu Dec 11 16:20:29 CET 2008


Florian Klaempfl schreef:
> Mattias Gärtner schrieb:
>> Zitat von Michael Van Canneyt <michael at freepascal.org>:
>>
>>> [...]
>>> This is the problem: At which point should this be done ?
>>>
>>> Can you point at the statement where it should be raised in the following
>>> code:
>>>
>>>  try
>>>    ...
>>>    DoParallel(...);
>>>    ...
>>>  except
>>>  end;
>>>
>>> There is only 1 possible location: in a waitloop which should be after the
>>> DoParralel. This loop must check for the exceptions...
>> Not after, but at the end of DoParallel.
> 
> What happens if more threads throw an exception?

A new exception is thrown, which has a List of InnerExceptions, instead 
of just a single InnerException ;-)

Vincent



More information about the fpc-devel mailing list