cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <vadim.gritse...@verizon.net>
Subject Re: Should we catch java.lang.Error? (was RE: XMLForm and sitemap problem (fwd))
Date Thu, 08 May 2003 15:05:06 GMT
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? 


How about more local approach? Say, catch NoClassDefFoundError in 
treeprocessor when it creates component handlers... Then it's clear that 
the problem is because component is missing.

Vadim



Mime
View raw message