From: "Iñaki Baz Castillo" Date: 2008-04-04T04:36:20+09:00 Subject: Re: How to use "retry" into two deep begin/rescue/end ? El Jueves, 3 de Abril de 2008, Peña, Botp escribió: > C:\family\ruby>cat test.rb > loop do > begin # FIRST BEGIN > puts "first welcome" > > begin # SECOND BEGIN > raise "triggered ERROR in second begin" > rescue =>e > puts "rescuing error: "+e.message > puts "retrying to first welcome.." > sleep 1 # put this to slow down > next # this goes back to next loop > end > rescue > puts "Error in first welcome" > end > puts "this is never executed in this example :)" > end > > C:\family\ruby>ruby test.rb > first welcome > rescuing error: triggered ERROR in second begin > retrying to first welcome.. > first welcome Yeah !! thanks a lot, I was looking for it but I've not found that "next" command anywhere. Thanks ;) -- Iñaki Baz Castillo