alogrep 0 Posted Saturday at 05:42 PM Hi. It is a few days that the IDE does not catch unhandled exceptions. For example, if i put a line with a division by zero, it just goes on. Before the system caught it and the app stopped after the error message. I have checked for any 'forgotten' Application OnException in my code, but I found none. The settings in Compile and Linking are shown in the attached picture. What else should I check, please? Share this post Link to post
Hans J. Ellingsgaard 23 Posted Saturday at 05:50 PM Shouldn't you be in the Debug configuration settings? Share this post Link to post
Brian Evans 118 Posted Saturday at 07:55 PM The debugger catches them before they are handled in the application/project not after. When shown by the debugger there is a checkbox to ignore that class of exception going forward. Share this post Link to post
David Heffernan 2428 Posted Saturday at 09:20 PM (edited) Or maybe floating point exceptions are masked so there is no exception. We can't see your code, or know what version you use. Edited Saturday at 09:20 PM by David Heffernan Share this post Link to post
Remy Lebeau 1573 Posted yesterday at 03:38 AM (edited) Are you using C++ or Delphi? Integer division or floating-point division? Can you provide an example that is not working for you? Edited 18 hours ago by Remy Lebeau Share this post Link to post
Lajos Juhász 316 Posted yesterday at 06:42 AM The version also matters since it was changed for version 12. https://dalijap.blogspot.com/2023/09/coming-in-delphi-12-disabled-floating.html Share this post Link to post
alogrep 0 Posted 15 hours ago Thanks to all. No, the division by zero was an exampte (and a test I actually didi). It is all exceptions (that are not handled) The more critical one is when I set a table to an index name that does not esxist. The app just exit, no wrnings. Share this post Link to post
David Heffernan 2428 Posted 15 hours ago 43 minutes ago, alogrep said: Thanks to all. No, the division by zero was an exampte (and a test I actually didi). It is all exceptions (that are not handled) The more critical one is when I set a table to an index name that does not esxist. The app just exit, no wrnings. Doesn't sound like it's not that exceptions aren't handled. App exiting is entirely different. How about the details we asked for. Share this post Link to post
alogrep 0 Posted 12 hours ago OOps!. I got confused . What happens is this I have this bit of code begin n:=0; d:=100/n; if d>0 then n:=1; dm2.tabstable.indexname:='xyz'; The first error is ignored, no warning, no message. The second error is caught, but it does notshow the call stack, so I do not know WHERE it happens (in this case yes I know, but is a nightmare when it may happen God only know where) Share this post Link to post
Remy Lebeau 1573 Posted 9 hours ago (edited) 2 hours ago, alogrep said: The first error is ignored, no warning, no message. That code is performing floating-point division. And as Lejos mentioned, floating-point exceptions behave differently in Delphi 12 than they did in earlier versions. https://dalijap.blogspot.com/2023/09/coming-in-delphi-12-disabled-floating.html This is also documented by Embarcadero: https://docwiki.embarcadero.com/RADStudio/Athens/en/What's_New#Disabling_Floating-Point_Exceptions_on_All_Platforms Quote The second error is caught, but it does not show the call stack If you want to see a Call Stack at runtime, you have to display it yourself. You can catch the Exception (or use the TApplication(Events).OnException event) and then read the Exception.StackTrace property. However, this requires you to install a 3rd party exception logging library, such as MadExcept or EurekaLog, to populate the trace details. Embarcadero does not provide that functionality. In which case, you may as well use that library's own logging capabilities. Edited 9 hours ago by Remy Lebeau Share this post Link to post