0
点赞
收藏
分享

微信扫一扫

输出函数不应抛异常


库函数接口注意

DLLs and libraries should handle all exceptions to prevent the display of errors and warnings through Windows dialogs.
-- From Delphi help: Creating packages and DLLs

DLL输出函数抛异常通常会导致程序崩溃。
而且错误很难定位。

应用try/except包裹所有的输出函数。
输出函数的参数也要严格检查。

举报

相关推荐

0 条评论