WAD @ping throws unavoidable error

#1
If pinging an address that doesn't exist, an error is shown that can't be prevented (as far as I've tried). Makes it difficult to use in monitoring situations you want to keep ping'ing until the address becomes live.

 
#2
p.s. I realize this is a WinSocks error message, but the idea of @ping -2 response is an address is unreachable, so there should be away to prevent the system exception from bubbling up.
 

rconn

Administrator
Staff member
May 14, 2008
10,576
97
#3
Not reproducible here. Apparently your system or ISP is returning an 11004 (valid name, no data record) error when AFAIK everybody else returns a 11001 (invalid host). But "nothing" is definitely not a valid name!

So you're *not* getting a -2 (unreachable) response; you're getting a DNS error and then an error return (-2). @PING will only return a -1, -2, or -3 (with no error message & exit) if you have a non-fatal error.