문제

I'm making a connection to several servers in my script and currently if one of them is down I get a ** Access Error: Network timeout error and the script stops. I'd rather be able to detect and move on instead of having it giving up altogether.

Is there a way to do this detection?

도움이 되었습니까?

해결책

For error handling use TRY and test the result:

>> 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."
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top