• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Is there a way to turn off Exception Notification in Delphi while unit testing, on a particular project

Resolved: Is there a way to turn off Exception Notification in Delphi while unit testing, on a particular project

0
By Isaac Tonny on 18/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I am using Delphi 11 with the DUnitx unit testing. I know that I can turn off “Language Exceptions” in Tools/Options. But this turns it off for all projects.
Is there a way to turn them off for “unit testing”, or “per project”.

Answer:

The only way I know of to accomplish this, in all Delphi versions, is by using breakpoints.
Put a breakpoint at the point in the code where you want to disable the debugger’s exception handling. Right-click on the breakpoint to go into its properties. In the “Advanced” options, turn off the Break option and turn on the Ignore subsequent exceptions option.
Place another breakpoint at the point in the code where you want to re-enable the debugger’s exception handling. In the properties, turn off the Break option and turn on the Handle subsequent exceptions option.
Now run the code, and you can debug as needed, except for the code you masked off.

If you have better answer, please add a comment about this, thank you!

delphi delphi-11-alexandria unit-testing
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: Getting ‘502 Bad Gateway’ while deploying Springboot app in EKS

24/03/2023

Resolved: Why is NGINX’s $request_uri empty?

24/03/2023

Resolved: How to convert Java bytecode to Webassembly using CheerpJ compiler

24/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.