AuthorizationException
class AuthorizationException extends RuntimeException
The caller is known but is not allowed to do this. Distinct from AuthenticationException, which reports that the caller could not be identified at all.
Every class in this hierarchy takes an optional message, another exception whose message it reuses, or nothing at all. isException recognises all of them; a plain Error is not one.
Examples
Throwing and catching
throw new AuthorizationException("something specific about this call");
try {
doWork();
} catch (error) {
if (error instanceof AuthorizationException) {
// handled
}
}
See also
Source
23 September 2026
This documentation was generated with AI (Claude) from the library's source code.