如何禁用Delphi中的所有异常提升? [英] How to disable all exception raising in Delphi?

查看:320
本文介绍了如何禁用Delphi中的所有异常提升?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种方法可以在发生异常或错误时禁用所有对话框(如访问冲突,插入错误,超时等)?它们有时会在我的程序中抛出,但这些错误并不是以任何方式致命的,可以忽略,只是对话框令人不安。我使用Delphi 7。

解决方案

如果你不要显示异常窗口,那么转到:



工具/选项/调试器选项/语言异常 ,并禁用复选框 语言异常通知 。那就是Delphi 2010的walid。



(我不记得如果它是Delphi 7中的CheckBox)。


$ b $在某些情况下,例外是不可避免的,特别是当我们使用互联网上的未知文件时。所以,我相信你的例外在Indy处理得当,只是关闭 语言异常通知


Is there a way to disable all the dialog boxes when an exception or error occurs(like access violations, indy socket errors, timeouts etc.)? They are thrown sometimes in my program, but these errors aren't fatal in any way and can be ignored, just the dialog boxes are disturbing. I use Delphi 7.

解决方案

If you just don't wont to show the exception window then go to:

Tools/Options/Debugger Options/Language Exceptions and disable CheckBox Notify on language exceptions. That is walid for Delphi 2010.

(I don't remember if it is the same CheckBox in Delphi 7).

EDIT: In some cases the exceptions are unavoidable, specially when we are working with unknown files from internet. So, I believe that your exceptions are handled properly under Indy, just switch-off Notify on language exceptions

这篇关于如何禁用Delphi中的所有异常提升?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆