On Friday 22 June 2007 06:27, Carsten Bager wrote: > In the small threads program below I force a runtime error in a > thread. How do I get access to the output from the thread when it > stops? This program does not write anything to the terminal when the > thread stops.
In case a runtime error occurs, the thread object stores the exception which occured, so before destroying the threads try something like: |if Assigned (t1.FatalException) do | WriteLn (StdErr, t1.FatalException.ClassName, | t1.FatalException.Message); Alternatively you can embrace the Execute method with a try-except statement. Regards, Vinzent. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal