I’ve got a quite strange situation where a ThreadEndException is caught by an App.UnhandledException Handler in a compiled WebApplication (Standalone OSX).
My Log contains the following:
App.UnhandledException:
Exception: ThreadEndException
Error: 0 -
Stack:
Sub Thread.Sleep( int32, boolean )
Sub HTTPRequestSocket.WaitUntilFinished()
Sub HTTPRequestSocket.Finish( HTTPServer.HTTPRequestContext, boolean )
Sub HTTPRequestContext.Finish( int32, boolean )
Sub WebApplication.HandleHTTPRequest( HTTPServer.HTTPRequestContext )
Sub HTTPRequestThread.Event_Run()
this looks like the Exception is coming from the somewhere in the framework. I know you can catch such an Exception with an catch-all exception block, but the UnhandledException Handler should only get not handled exceptions. I do have statements to re-raise End-Exceptions where I may catch one by accident, thus. Should the Unhandled Exception handlers catch End-Exceptions? Should we re-raise them from there?
What was happening in the App just before is to issue an App.Quit from a Thread. May this be disallowed?