Could there be another form of load that would report parse errors as an
exception instead of crashing the entire process?

begin
  load_with_precaution('junk.pl')
rescue
  puts "Cannot load that piece of !@#$"
end

Guillaume.

On Fri, 2003-06-20 at 14:29, Yukihiro Matsumoto wrote:
> Hi,
> 
> In message "Re: rescuing errors.. catch-all"
>     on 03/06/21, Daniel Bretoi <lists / debonair.net> writes:
> 
> |> Exception should catch all errors.  But rescue does not help, when you
> |> get error before entering protected region (main, this case), for
> |> example, syntax errors, or even in kicking interpreter.
> |
> |would this seem to be a reasonable feature request to make? it would be
> |very nice to be able to catch everything and be able to do with it what
> |you like, especially with html.
> 
> I'm afraid that your request is rb_protect() to catch _everything_.
> Unfortunately it's impossible.
> 
> 							matz.
>