Conditional define to suppress IDE interception of Exceptions in Delphi 6 Pro?

天大地大妈咪最大 提交于 2019-12-12 22:17:07

问题


I know I can use the IDE settings in Delphi Pro 6 to stop the IDE from intercepting and handling Delphi Exceptions (stopping the program and entering Debug mode), but unfortunately that turns off that handling for all Exceptions. The Access Violation Exception is happening in a DLL that I don't have the source code for. I was wondering if there is a conditional symbol I don't know about that I could define/undefine around the offending code block so at least I could turn off Exception handling around that code block. If not, perhaps some trick or technique to do so?


回答1:


Compiler directives control how the compiler and linker turn your source code into executable code. Debugging instructions aren't stored in the DCU or the binary, so compiler directives can't control what you're after.

There are several ways to control exception handling. I've described them in an article I wrote a few years ago:

  • Use "advanced breakpoints" to define where the debugger should start or stop interrupting on exceptions.
  • Define certain exception classes that the debugger will always ignore.
  • Disable stopping on exceptions.
  • Disable debugging altogether.


来源:https://stackoverflow.com/questions/4271066/conditional-define-to-suppress-ide-interception-of-exceptions-in-delphi-6-pro

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!