If to put unexistant role in policy one will face following exception:

org.apache.cocoon.ProcessingException: Unable to get transformer handler for 
cocoon://lenya-page/default/authoring/index.xml?doctype=homepage: 
org.apache.excalibur.xml.xslt.XSLTProcessorException: Exception in creating 
Transform Handler
        at 
org.apache.cocoon.transformation.TraxTransformer.setup(TraxTransformer.java:318)
Caused by: org.apache.excalibur.xml.xslt.XSLTProcessorException: Exception in 
creating Transform Handler
        ...etc
Caused by: java.lang.NullPointerException
        at 
org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.java:423)
        at 
org.apache.excalibur.xml.xslt.XSLTProcessorImpl.sourceToSAX(XSLTProcessorImpl.java:359)
        ...etc

It is scarcely meaningfull.

In case of invalid User, Group or IPRange it is handled in
PolicyBuilder, but not using exception, but comparing returned accreditable 
with null.
But in case of invalid Role it is not handled anywhere and it produces 
unadequate result.

Interfaces of RoleManager, UserManager, etc do not define any
exception from getRole, getUser, etc.

I reported "enhancement" bug about it.

I think it is strongly reasonable to throw exception in all methods that may 
fail.
Including getRole, getUser and all that stuff.

And what do you think ?

-- 
 qMax


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to