[fpc-pascal] Unhandled exception from library crashes host exe

Antonio Fortuny a.fortuny at sitasoftware.lu
Wed Jun 27 16:22:31 CEST 2012


Le 27/06/2012 16:14, OBones a écrit :
> Hello,
>
> Regular exceptions, those raised with the "raise" keyword are always 
> trapped by try..except blocks but you have to make sure that EVERY 
> method in the DLL that is called by the host exe has such a construct 
> so as not to let the exception escape.
> However, there are exceptions that come from the FPU and that arise 
> when doing floating point maths. Those, in a DLL, are not trapped by 
> the try..except blocks and are passed back to the host exe, 
> effectively crashing them.
> If you want to trap them, you have to add a special unit in your DLL 
> project, as explained in this issue:
>
> http://bugs.freepascal.org/view.php?id=12974
I read quickly the las post and seems encouraging. I'll try it in my UDF 
(64bit, windows, Michael is right) and report any discrepancy but not 
before next week.
>
> Look for the last comment, it works fine here
>
> Regards
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal






More information about the fpc-pascal mailing list