hi! > > Anyway, I'm trying to catch an error without exiting the program, > > i.e. an equivalent to rescue, but without the exit. > > > > is it possibile? > Absolutely. > begin > # some code that raises an error > a = 1/0 > rescue ZeroDivisionError > puts "Can't divide by 0... back to math 101 for you..." > end mmm, I'm trying with this code: require 'net/http' h = Net::HTTP.new('test.host.it', 80) ciao = Array.new resp, data = h.get('/test.html', nil ) puts "Code = #{resp.code}" puts "Message = #{resp.message}" resp.each {|key, val| printf "%-14s = %-40.40s\n", key, val } data.each_line { |line| ciao.push($2) if /(href="*(http:\/\/.*?)[>" ]){1,}/ =~ line} begin ciao.each {|line| resp, data = h.get(line) p line } rescue Net::ProtoFatalError print "catched\n" end if there's an error 404, the exeption is catched, but the program ends. NOTE: I'm working on the RE. it's not fully working. ciao, Marco