On 19 Oct 2009, at 19:08, Bart wrote:

In the code that "translates" the "you did something nasty" to
runerror(some_exit_code) it may be possible to differentiate between
float and integer fault?

It is (on some platforms with some hacking).

This info could then be stored in some variable/object that can be
used by the code that intercepts the run-time error and raises the
actual fpc exception?

In theory this is of course possible, but in practice this is extremely error prone due to the nature of signal handlers. Furthermore, adding extra global variables to the interface of the system unit is very much frowned upon, and this would be required since the signal handling happens in the system unit and the translation to exceptions in the sysutils unit. Another, and much easier, option would be to change the run time error number for either integer or floating point div-by-zero. But that would obviously cause its own share of compatibility problems.


Jonas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to