From: "Gennady F. Bystritsky" Date: 2002-12-06T07:48:42+09:00 Subject: Re: on error resume next Put the code you want to be executed in ensure: begin error rescue ensure print "Finishing..." end You will get "Finishing..." printed out despite any exception, rescued or not. Gennady. ----- Original Message ----- From: "Shannon Fang" To: "ruby-talk ML" Sent: Thursday, December 05, 2002 2:21 PM Subject: on error resume next > Hi, > > In the following code, how can I implement the VB "On Error Resume Next" > in ruby? > > def error > raise "ERROR_DELIBERATE" > print "I'm back" > end > begin > error > print "Finishing..." > rescue > ??? > end > > Can I let my program execute either of the 2 print? If I use retry, it > will re-run error, and lock the program. > > Thanks > Shannon > > > > >