Pergunta

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?

Foi útil?

Solução

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."
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top