Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2006-12

RunError handling and threads

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Colin Western

Is there a good reason why RunError does not raise an exception in the same way that HandleError does (if SysUtils is installed)? RunError is a particularly bad routine to call from a thread as it starts finalizing variables that are most likely still in use by other threads. An exception makes much more sense in these circumstances.

The place I noticed this was in cthreads.pp, which has many calls to RunError, which are invoked if you make a mistake in your thread handling.

My proposal is simply to make RunError call the current HandleError function (or at the very least export HandleError from System and call it from cthreads)

Colin

Reply by email