Jump to content

Koen Van de moortel

Members
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. Koen Van de moortel

    "Divided by zero" exception

    I had the same problem! In Delphi 10.4 the compiler directives {$Q+} or {$R+} don't seem to have any effect anymore. The only thing that seems to make try... except to work like it should, is System.Math.SetExceptionMask([exPrecision]); But you have to add this in every procedure, since apparently many procedures (from Delphi/Windows???) arrogantly set all the masks without removing them! I have no idea why this has become the default, since it makes all "try... except" blocks totally useless! And... very weird, but don't do this: System.Math.SetExceptionMask([]); !!! System.Math.SetExceptionMask([]); x:=2; y:=exp(x); // TOTAL PROGRAM CRASH!!! Why????????????? I have no clue! It looks like a bug to me!
×