Skip to content

Most visited

Recently visited

navigation
Added in API level 1

AccessControlException

public class AccessControlException
extends SecurityException

java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.RuntimeException
         ↳ java.lang.SecurityException
           ↳ java.security.AccessControlException


AccessControlException is thrown if the access control infrastructure denies protected access due to missing permissions.

Summary

Public constructors

AccessControlException(String message)

Constructs a new instance of AccessControlException with the given message.

AccessControlException(String message, Permission perm)

Constructs a new instance of AccessControlException with the given message and the requested Permission which was not granted.

Public methods

Permission getPermission()

Returns the requested permission that caused this Exception or null if there is no corresponding Permission.

Inherited methods

From class java.lang.Throwable
From class java.lang.Object

Public constructors

AccessControlException

Added in API level 1
AccessControlException (String message)

Constructs a new instance of AccessControlException with the given message.

Parameters
message String: the detail message for this exception.

AccessControlException

Added in API level 1
AccessControlException (String message, 
                Permission perm)

Constructs a new instance of AccessControlException with the given message and the requested Permission which was not granted.

Parameters
message String: the detail message for the exception.
perm Permission: the requested Permission which was not granted.

Public methods

getPermission

Added in API level 1
Permission getPermission ()

Returns the requested permission that caused this Exception or null if there is no corresponding Permission.

Returns
Permission the requested permission that caused this Exception, maybe null.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.