From: Robert Klemme Date: 2008-10-01T20:45:16+09:00 Subject: Re: "ensure" hiding actual error 2008/10/1 Nit Khair : > In my main program I have a "begin ensure end". > The "ensure" releases some resources. > > If there is a syntax error somewhere deep, the program comes to 'ensure' > and shows me an error in the 'ensure', not the original error. Only if I > block out the 'ensure', does the actual error show. > > I tried "rescue" with Exception, StandardError and ScriptError to print > the exception, but flow never reaches the 'rescue' block, it jumps ahead > to "ensure". This sounds strange because syntax errors should be caught earlier - unless they stem from an "require" or "load". Can you post a short example that reproduces the error? Kind regards robert -- remember.guy do |as, often| as.you_can - without end