Tcp socket rescue error? how to handle

I know this is kind of a basic error handle, i wrote this client a long
time ago and it works well but im tiered of seeing
Connection refused - connect(2) (Errno::ECONNREFUSED)

i would would like to see the client just exit

I handle the socket with a block{}[0],ARGV[1]) {|sock| do something with socket}

so, i guess what im trying to do is something like this[0],ARGV[1]) { rescue; puts"exit now"; else |sock|

here is a pastebin, line 15