質問

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