cancel
Showing results for 
Search instead for 
Did you mean: 

How to throw an exception that is not treated as error

Former Member
0 Kudos

Hi,

I have a repository manager displayed as /root/myrepository. Now when someone who's not authorized clicked it, I wish an error message will display on top in red, but not throw an exception as System Error.

Now my implementation is to throw an ResourceException in getChildren() of the node. But when the user clicked on /root/repository, a System Error screen appeared, but what I want is just an error message.

Any help is much appreciated~

I don't know how to attach the screenshots. My MSN is alarm_ray@hotmail.com

Thanks,

Ray

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

If you want to disallow getChildren altogether, throw an AccessDeniedException. If you want to hide specific children, just don't put them into the result list.

Best regards, Julian

Answers (0)