gpt4 book ai didi

delphi - 已弃用的 TToolServices.RaiseException 的替代品是什么?

转载 作者:行者123 更新时间:2023-12-03 15:56:30 26 4
gpt4 key购买 nike

Toolintf 单元现已弃用。在 ToolsAPI 中,Delphi XE4 的 TToolServices.RaiseException 的替代品是什么?

最佳答案

据我了解,您应该执行以下操作:

  1. 引发从 ENonAIRException 派生的异常,这是在 ToolsAPI 单元中声明的异常类。
  2. 确保您的代码不处理异常。换句话说,让它沿着调用堆栈向上传播到 IDE 代码。

ENonAIRException 的文档(事实上,只不过是源代码中的注释)指出:

ENonAIRException exceptions, when unhandled, will not show the user an exception dialog with a stack trace and will not allow the user to submit an Automated Incident Report (AIR) to Quality Central. Exceptions in IDE addins that are intentionally left unhandled should be of this type (or of a type that is derived from this type)

关于delphi - 已弃用的 TToolServices.RaiseException 的替代品是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19495898/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com