Delphi 2007 - Is it possible to get a list of ignored exception classes at run-time?

323 views Asked by At

I'm wanting to determine at run-time if an exception class has been specifically ignored in the IDE. The reason is this: When running an application from the IDE I might receive an exception that I know the reason for, but don't want to deal with right now. So I check the "Ignore these exceptions" box and click continue.

Its possible that I might forget to disable this setting later, so I want to add code at the startup of the application to warn me that exceptions in the list at Tools/Options/Debugger Options/CodeGear Debuggers/Language Exceptions are being ignored.

An alternative would be a fragment of code that could determine the status of an exception class (i.e. whether ignored or not) without triggering the exception in the IDE.

2

There are 2 answers

0
Jan Doggen On BEST ANSWER

If you don't want to deal with exceptions in the IDE set breakpoints around the point where they occur. Then edit the breakpoints:

For the first one set its advanced properties to not Break on exception and to Ignore subsequent exceptions.

For the second one set its advanced properties to not Break on exception and to Handle subsequent exceptions.


You have to take care to not throw away those breakpoints (e.g. using Delete all breakpoints), and occassionally they lose their proper place in the editor. It's also difficult to share these with other developers if you work with source control.

1
Remy Lebeau On

The application being debugged doesn't have access to the debugger's list of ignored exceptions. Unless you figure out where and how the debugger stores that configuration and read/decypher it manually.