Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在我的脚本中连接到多个服务器,目前如果其中一个服务器出现故障,我会收到** Access Error: Network timeout错误并且脚本停止。我宁愿能够检测并继续前进,而不是让它完全放弃。
** Access Error: Network timeout
有没有办法进行这种检测?
对于错误处理,请使用 TRY 并测试结果:
>> err: try [read http://localhost] ** Access error: protocol error: "Timeout" >> if all [error? err err/id = 'protocol err/arg1 = "Timeout"] ["Got a timeout."] == "Got a timeout."