From: Dave Pearson Date: 2002-12-11T23:58:38+09:00 Subject: Re: TCPsocket, Errno::ECONNREFUSED and ruby on Windows * ts : > >>>>> "D" == Dave Pearson writes: > > D> ,---- > D> | begin > D> | ...do socket opening stuff... > D> | rescue SocketError, Errno::ECONNREFUSED => e > D> | print "Error connecting to server: #{e}\n" > D> | end > D> `---- > > Why not > > begin > # ...do socket opening stuff... > rescue > print "Error connecting to server: #{$!}\n" > end Because that catches all errors. -- Dave Pearson http://www.davep.org/