Subject: [ruby-talk:6014] Re: Exception handling
From: Robert Feldt <feldt ce.chalmers.se>
Date: Fri, 3 Nov 2000 02:29:21 +0900
In-reply-to: 6012
On Fri, 3 Nov 2000, David Suarez de Lis wrote:
> How do we cope with this kind of things?
>
> file.close unless file.nil?
>
file.close if file
> (is there any way of catching that before the ensure clause?)
>
if !file
...
end
Regards,
Robert