On Mon, Aug 27, 2001 at 09:39:26PM +0900, Marco Milanesi wrote: > > > Anyway, I'm trying to catch an error without exiting the program, > > > i.e. an equivalent to rescue, but without the exit. > begin > ciao.each {|line| > resp, data = h.get(line) > p line > } > > rescue Net::ProtoFatalError > print "catched\n" > end As the program is now, it will jump out of the loop to the exception handler when an exception occurs. You probably want something like this: ciao.each {|line| begin resp, data = h.get(line) p line rescue Net::ProtoFatalError puts "catched" end } // Niklas