日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

【机器视觉】 throw算子

發布時間:2024/4/24 编程问答 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 【机器视觉】 throw算子 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

00. 目錄

文章目錄

    • 00. 目錄
    • 01. 概述
    • 02. 簽名
    • 03. 描述
    • 04. 注意
    • 05. 參數
    • 06. 結果
    • 07. 附錄

01. 概述

throw- 拋出一個用戶定義的異常或重新拋出一個捕獲的異常。

02. 簽名

throw( : : Exception : )

03. 描述

? 使用try,catch,endtry和throw等算子可以在HDevelop中實現動態的異常處理,這相當于(comparable)與C ++和C#中的異常處理。 HDevelop中異常處理的基本思想也在算子try,dev_set_check以及“HDevelop User’s Guide”中進行了描述。

算子throw提供了一個可以從程序中的任意位置拋出異常的時機。 這個異常可以被周圍的try-catch塊的catch算子捕獲。 通過這種方式,開發者能夠定義他自己的特定的錯誤或異常狀態,為了繼續特定的交叉程序(cross-procedure)異常處理,例如為了釋放資源或從定義的狀態重新開始,正常的程序執行被中止。(By this means the developer is able to define his own specific error or exception states, for which the normal program execution is aborted in order to continue with a specific cross-procedure exception handling, e.g., for freeing ressources or restarting from a defined state.)

在這樣的用戶定義的異常中,可以拋出幾乎任意的元組作為Exception參數,元組的第一個元素應該被設置為用戶定義的錯誤代碼> = 30000。

另外,使用此算子可以重新拋出算子catch捕獲的異常。 例如,如果在一個內部的try-catch-endtry塊內(例如,在一個外部程序中),只有特定的異常可以以適當的方式處理,而所有其他異常必須傳遞給調用者, 被一個外部的 try-catch-endtry塊捕獲和處理。

為了重新拋出一個被捕獲的異常,可以將由catch算子捕獲的Exception元組直接傳遞給throw算子的Exception參數。 此外,可以在異常元組中追加任意的(但不能是圖形)用戶數據,可以通過算子dev_get_exception_data將異常捕獲為“user_data”后訪問:

try...catch (Exception)...UserData := ...throw ([Exception, UserData])endtry

原文描述

With the help of the operators try, catch, endtry, and throw 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 also described at the operators try, and dev_set_check as well as in the “HDevelop User’s Guide”.

The operator throw provides an opportunity to throw an exception from an arbitrary place in the program. This exception can be caught by the catch operator of a surrounding try-catch block. By this means the developer is able to define his own specific error or exception states, for which the normal program execution is aborted in order to continue with a specific cross-procedure exception handling, e.g., for freeing resources or restarting from a defined state.

In such a user-defined exception a nearly arbitrary tuple can be thrown as the Exception parameter, merely the first element of the tuple should be set to a user-defined error code >= 30000.

In addition, with the help of the operator throw it is possible to rethrow an exception that was caught with the operator catch. This may be sensible, for instance, if within an inner try-catch-endtry block (e.g., within an external procedure) only specific exceptions can be handled in an adequate way and all other exceptions must be passed to the caller, where they can be caught and handled by an outer try-catch-endtry block.

For rethrowing a caught exception, it is possible to pass the Exception tuple that was caught by the catch operator directly to the Exception parameter of the throw operator. Furthermore, it is possible to append arbitrary (but no iconic) user data to the Exception tuple, that can be accessed after catching the exception as ‘user_data’ with the operator dev_get_exception_data:

04. 注意

算子導出try,catch,endtry和throw不支持C語言,支持語言C ++,C#和VisualBasic / .NET。 只有后者支持跨程序拋出異常。

05. 參數

Exception (input_control)   exception-array → (integer / string)
  返回異常數據或用戶定義的錯誤代碼的元組。

06. 結果

如果指定參數的值是正確的,則throw(作為算子)返回2(H_MSG_TRUE)。 否則會引發異常并返回錯誤代碼。

HDevelop例程

try_catch.hdev Demonstrate the usage of the exception handling in HDevelop
set_shape_model_timeout.hdev Demonstrate how to use the timeout mechanism for shape-based matching
cancel_draw_result.hdev Enable user-defined actions when a draw operation is canceled

程序示例

try...catch (Exception)...UserData := ...throw ([Exception, UserData])endtry

07. 附錄

7.1 機器視覺博客匯總
網址:https://dengjin.blog.csdn.net/article/details/116837497

總結

以上是生活随笔為你收集整理的【机器视觉】 throw算子的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 国产特级视频 | 野花国产精品入口 | 国产精品久久在线观看 | 好吊色视频一区二区三区 | 日韩成年视频 | 色综合天| 中文在线字幕免费观看电 | 免费麻豆国产一区二区三区四区 | 又大又粗欧美黑人aaaaa片 | 青青草原国产在线观看 | 男女日批免费视频 | 日韩一区二区三区免费视频 | 国产精品高潮呻吟久久av野狼 | 国产精品香蕉 | 国产大学生av | 国产美女久久久久 | 久操国产| 久久久久亚洲AV成人网人人小说 | 国产精品日| 国产精品亚洲а∨天堂免在线 | 成人爽a毛片一区二区 | 无码免费一区二区三区免费播放 | 亚洲精品视频三区 | 精品人伦一区二区三区蜜桃免费 | 深夜在线免费视频 | 国产一二在线 | 日韩av免费播放 | 波多野结衣a v在线 欧洲免费av | 一区二区乱子伦在线播放 | 国产最爽的乱淫视频国语对白 | 嫩草国产在线 | 激情视频区 | 中国一区二区三区 | 香蕉视频在线免费播放 | 国产精品国产一区二区三区四区 | 日韩免费看| 性xxxxxxxxx18欧美 | 亚洲一区二区免费在线观看 | 农村妇女精品一区二区 | 青青99 | 丰满多毛的大隂户视频 | 国产乱码精品一区二区三区亚洲人 | 四虎影院在线免费播放 | 大陆女明星乱淫合集 | 亚洲成人免费网站 | av在线短片 | 国产高清一区在线观看 | 欧美 日韩 成人 | 日日骚av一区二区 | 91呦呦 | 手机av片 | 免费三片在线观看网站v888 | 综合狠狠 | 国产美女一区二区 | 黄色在线免费看 | 亚洲精品高潮久久久久久久 | √资源天堂中文在线视频 | 韩国伦理片在线观看 | 欧美精品video | 朝桐光av在线 | 人人看人人草 | 一眉道姑 | 亚洲精品久久久久久无码色欲四季 | 污站在线观看 | 椎名空在线播放 | 日韩av男人的天堂 | 国产精品日韩 | 亚洲视频播放 | 婷婷久久一区 | jizzjizzjizz亚洲女 | 奇米一区| 久久99亚洲精品 | 久久一久久 | 色婷婷aⅴ一区二区三区 | 亚洲精品国产精品乱码在线观看 | 国产成人一区二区三区影院在线 | 自拍偷拍国产视频 | 一级日韩片 | 啪啪免费网站 | 欧洲性生活片 | 日韩av电影网站 | 亚洲一区二区三区免费看 | 日韩不卡一区二区 | 日韩一区二区免费播放 | 日本妇乱大交xxxxx | av一级| 深夜视频一区二区三区 | 人人干97| 婷婷国产成人精品视频 | 日本青青草 | 免费毛片在线播放免费 | 无人在线观看的免费高清视频 | 色呦呦网站| 在线观看国产视频 | va视频在线| 国产伦精品一区二区三区在线观看 | 日韩av在线免费 | 色妺妺视频网 | 欧美精品一区二区在线观看 |