>>> snip snap
> I happen to dislike plain Exception.
>
> How about this:
>
>   * We declare LoginException as a checked exception which may
>     be thrown and handled like LoginException thrown from the
>     ResourceResolverFactory.getResourceResolver method
>   * Document SlingException may be thrown to convey any problem
>     while handling the credentials
>   * In the SlingAuthenticator we will still catch all Exceptions
>     and only handle LoginException specially
>
> WDYT ?

Ok, to be honest, after making the patch I was not happy with the
plain Exception either (as explained in the comment to the patch).
I would like to allow the LoginException be thrown by the postProcess
method as well. And as you proposed it's also possible to throw a
SlingException which wouldn't be caught by SlingAuthenticator.
I made a new patch and included it in SLING-1593.

best regards
mike

Reply via email to