使用右上角的选项卡切换到不同的编程语言。

使用右上角的选项卡切换到不同的编程语言。

使用右上角的选项卡切换到不同的编程语言。

使用右上角的选项卡切换到不同的编程语言。

endtryendtryEndtryEndtryendtry结束尝试(算子)

名称

endtryendtryEndtryEndtryendtry — 结束处理异常的块。

签名

endtry( : : : )

Herror endtry()

Herror T_endtry()

void Endtry()

static void HOperatorSet.Endtry()

def endtry() -> None

描述

借助 trytryTryTryTrytrycatchcatchCatchCatchCatchcatchendtryendtryEndtryEndtryEndtryendtrythrowthrowThrowThrowThrowthrow 算子,可在 HDevelop 中实现动态异常处理,其功能与 C++ 和 C# 中的异常处理机制相当。HDevelo p异常处理的基本概念已在 trytryTryTryTrytrythrowthrowThrowThrowThrowthrowdev_set_checkdev_set_checkDevSetCheckDevSetCheckDevSetCheckdev_set_check 算子说明以及 “HDevelop 用户指南” 中进行阐述。

算子 endtryendtryEndtryEndtryEndtryendtry 关闭了 trytryTryTryTrytrycatchcatchCatchCatchCatchcatch 算子打开的异常处理块。

注意

C 语言不支持导出 trytryTryTryTrytrycatchcatchCatchCatchCatchcatchendtryendtryEndtryEndtryEndtryendtrythrowthrowThrowThrowThrowthrow 算子,仅 C++、C# 和 VisualBasic/.NET 语言支持。其中仅后者支持跨函数抛出异常。

结果

endtryendtryEndtryEndtryEndtryendtry 始终返回 2 ( H_MSG_TRUE )。

另见

trytryTryTryTrytry, catchcatchCatchCatchCatchcatch, throwthrowThrowThrowThrowthrow, dev_get_exception_datadev_get_exception_dataDevGetExceptionDataDevGetExceptionDataDevGetExceptionDatadev_get_exception_data, dev_set_checkdev_set_checkDevSetCheckDevSetCheckDevSetCheckdev_set_check

模块

基础