cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <br...@outerthought.org>
Subject Re: Should we catch java.lang.Error? (was RE: XMLForm and sitemap problem (fwd))
Date Thu, 08 May 2003 14:20:00 GMT
On Thu, 2003-05-08 at 16:19, Bertrand Delacretaz wrote:
> Le Jeudi, 8 mai 2003, à 16:11 Europe/Zurich, Vadim Gritsenko a écrit :
> > ..There is one particular example of NoClassDefFoundError in 
> > ServerPagesGenerator, you may want to look at it... For inspiration... 
> > ;)
> 
> } catch (NoClassDefFoundError e) {
>              // VG: Usually indicates that page invoked with the wrong 
> case.
>              // I.e., it was compiled as "my.xsp" and inoked as "My.xsp",
>              // results in different class name and an error.
>              getLogger().warn("Failed to load class: " + e);
>              throw new ResourceNotFoundException(e.getMessage());
>          }
> 
> Yes, looks good when you know precisely why you're getting such an 
> exception.
> 
> But I think the discussion was about catching Errors or 
> NoClassDefFoundError at a more global level, isn't it?
> In that case we have to be more careful I think, to avoid (remotely) 
> possible loops.

What kind of loops do you have in mind?

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Mime
View raw message