From: jim@... Date: 2005-02-11T05:17:11+09:00 Subject: Re: Really confused about exceptions now * Mark Probert [2005-02-11 04:56:09 +0900]: > On top of the memory leak issue, I have been trying to track down unhandled > exceptions in my code. I have run across a very strange behavior that I will > try and explain. > > Problem(?) code (line numbers from bsn_a.rb) > > 141 def alive? > 142 t = TCPSocket.new(@host, @port) > 143 return true > 144 > 145 rescue Errno::ETIMEDOUT > 146 @exception = " Timed out (#{@host}:#{@port})" # returns a String, which is true. > 147 rescue SocketError => e > 148 @exception = " Socket error - #{e}" # returns a String, which is true. > 149 rescue Exception => e > 150 @exception = e > 151 return false > 152 end Just a quick note, your exceptions are returning true. -- Jim Freeze Code Red. Code Ruby