delphi debug error ignore in runtime

Posted on 2007-07-27
Last Modified: 2010-11-23
I got some errors in Delphi that I catch with
Once compiled, this runs fine however, when am I running it from Delphi in runtime mode (debug), I do not want my application to be stopped and I want to ignore these errors.
(Ignoring the try/except errors)
Any ideas ?
Question by:yarek
    LVL 19

    Expert Comment

    in your ide, goto your menu, and go to Tools,Options, Debugger options and see if you have 'notify on language exceptions'  there somewhere. it should be a check box. Uncheck that box and you will get the desired result.

    After testing, turn it back on to catch your other errors ;)

    good luck

    LVL 10

    Accepted Solution

    i am using D7

    Tools > Debugger Options .
         Goto "Language exceptions" tab
         Remove tick from "Stop on Delphi Exceptions"
    LVL 21

    Expert Comment

     As an alternative, try avoiding the exception. instead of...
      Result := A / B; // possible EDivideByZero

    do this...

      if C = 0 then
       Result := -1
      Result := A / B;

      Now I know that this is not always possible.  In area of code that could be called a few thousand times per second it can make  a big difference in speed since exception handling is costly.  Not only that, it will also get you around the problem of the application stopping while debugging.

    The other problem that arises when you get into the habit of ignoring exception types is that you are then unaware of the same exception type happening in another area of your program where you want (or need) to see it.
    LVL 21

    Expert Comment

    oops if B = 0...

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
    Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now