lib/vapir-ie/container.rb in vapir-ie-1.7.1.rc1 vs lib/vapir-ie/container.rb in vapir-ie-1.7.1
- old
+ new
@@ -25,10 +25,10 @@
# see documentation for the common Vapir::Container#handling_existence_failure
def handling_existence_failure(options={})
options=handle_options(options, :handle => :ignore)
begin
yield
- rescue WIN32OLERuntimeError, RuntimeError, Vapir::Exception::ExistenceFailureException
+ rescue WIN32OLERuntimeError, RuntimeError, NoMethodError, Vapir::Exception::ExistenceFailureException
raise if $!.class==RuntimeError && $!.message !~ /HRESULT/ # sometimes WIN32OLE raises a RuntimeError instead of a WIN32OLERuntimeError. only catch a RuntimeError if it's from WIN32OLE, indicated by HRESULT in the error message.
handle_existence_failure($!, options)
end
end
public