This is a problem I’m having with Xojo 2016r3 and Windows 7. So, if it is a Xojo bug, then it may not be present in current versions.
I have a project that uses Bob Delaney’s big float plug-in to do some extended precision calculations. This plug-in doesn’t return NaN’s when there is a calculation error such as divide by zero. Instead it raises an exception. I have the calculations enclosed in a try/catch block. When I deliberately do a divide by zero to test the exception handling, this block correctly handles it on both Mac and Linux platforms. But on Windows, it’s not caught and was forcing the application to shut down, until I added an application.unhandledexception event handler. This is a clumsy way to have to handle these exceptions. I’m not an expert on exception handling. So, I may be missing something simple.
The code is fairly simple and looks like this:
try doBigfloatCalculation catch err as fpDivideByZeroException myErrorCodeStuff catch err myErrorCodeStuff end try
When it was causing the Windows version to quit, the error message that it gave was indeed fpDivideByZeroException unhandled exception.
Has anyone else run into this problem?