public class AccessControlException extends SecurityException
AccessController denies
an attempt to perform an operation. This often keeps track of the
permission that was not granted.AccessController,
Serialized Form| Constructor and Description |
|---|
AccessControlException(String msg)
Create a new instance with a descriptive error message, and a null
Permission object. |
AccessControlException(String msg,
Permission perm)
Create a new instance with a descriptive error message and an associated
Permission object. |
| Modifier and Type | Method and Description |
|---|---|
Permission |
getPermission()
This method returns the
Permission object that caused
this exception to be thrown. |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic AccessControlException(String msg)
Permission object.msg - the descriptive error messagepublic AccessControlException(String msg, Permission perm)
Permission object.msg - the descriptive error messageperm - the permission that caused thispublic Permission getPermission()
Permission object that caused
this exception to be thrown.