Use the tabs on the upper right to switch to a different programming language.
Use the tabs on the upper right to switch to a different programming language.
Use the tabs on the upper right to switch to a different programming language.
Use the tabs on the upper right to switch to a different programming language.
endtryendtryEndtryEndtryendtry (算子名称)
名称
endtryendtryEndtryEndtryendtry
— Ends a block where exceptions are handled.
参数签名
Herror endtry()
Herror T_endtry()
描述
With the help of the operators trytryTryTryTrytry
, catchcatchCatchCatchCatchcatch
, endtryendtryEndtryEndtryEndtryendtry
,
and throwthrowThrowThrowThrowthrow
it is possible to implement a dynamic exception handling
in HDevelop, which is comparable to the exception handling in C++
and C#. The basic concepts of the exception handling in HDevelop are
described at the operators trytryTryTryTrytry
, throwthrowThrowThrowThrowthrow
, and
dev_set_checkdev_set_checkDevSetCheckDevSetCheckDevSetCheckdev_set_check
as well as in the “HDevelop User's Guide”
.
The operator endtryendtryEndtryEndtryEndtryendtry
closes the exception handling block that was
opened with the operators trytryTryTryTrytry
and catchcatchCatchCatchCatchcatch
.
注意
The export of the operators trytryTryTryTrytry
, catchcatchCatchCatchCatchcatch
, endtryendtryEndtryEndtryEndtryendtry
,
and throwthrowThrowThrowThrowthrow
is not supported for the language C, but only for
the languages C++, C# and VisualBasic/.NET.
Only the latter support throwing exceptions across procedure.
结果
endtryendtryEndtryEndtryEndtryendtry
always returns 2 (
H_MSG_TRUE)
.
参考其它
trytryTryTryTrytry
,
catchcatchCatchCatchCatchcatch
,
throwthrowThrowThrowThrowthrow
,
dev_get_exception_datadev_get_exception_dataDevGetExceptionDataDevGetExceptionDataDevGetExceptionDatadev_get_exception_data
,
dev_set_checkdev_set_checkDevSetCheckDevSetCheckDevSetCheckdev_set_check
模块
Foundation