From: nobu.nokada@... Date: 2002-12-06T19:52:16+09:00 Subject: Re: on error resume next Hi, At Fri, 6 Dec 2002 07:21:29 +0900, Shannon Fang wrote: > In the following code, how can I implement the VB "On Error Resume Next" > in ruby? I'm not sure why you want a such vice, but what about this? def raise(*args) super unless $ignore_error end def on_error_resume_next ignore_error = $ignore_error $ignore_error = true yield ensure $ignore_error = ignore_error end def error raise "ERROR_DELIBERATE" puts "I'm back" end on_error_resume_next do error puts "Finishing..." end -- Nobu Nakada