FileDocCategorySizeDatePackage
PrivilegedActionException.javaAPI DocAndroid 1.5 API3192Wed May 06 22:41:06 BST 2009java.security

PrivilegedActionException

public class PrivilegedActionException extends Exception
{@code PrivilegedActionException} wraps exceptions which are thrown from within privileged operations.

Privileged actions which can throw exceptions are of type {@code PrivilegedExceptionAction} and are thrown by

    {@code AccessController#doPrivileged(PrivilegedExceptionAction)}
    {@code AccessController#doPrivileged(PrivilegedExceptionAction, AccessControlContext)}

see
PrivilegedExceptionAction
see
AccessController#doPrivileged(PrivilegedExceptionAction)
see
AccessController#doPrivileged(PrivilegedExceptionAction, AccessControlContext)
since
Android 1.0

Fields Summary
private static final long
serialVersionUID
private Exception
exception
Constructors Summary
public PrivilegedActionException(Exception ex)
Constructs a new instance of {@code PrivilegedActionException} with the cause.

param
ex the exception which is the cause for this exception.
since
Android 1.0


                                             
       
        super(ex);
        this.exception = ex;
    
Methods Summary
public java.lang.ThrowablegetCause()
Returns the exception that was thrown by a {@code PrivilegedExceptionAction}.

return
the exception that was thrown by a {@code PrivilegedExceptionAction}.
since
Android 1.0

        return exception;
    
public java.lang.ExceptiongetException()
Returns the exception that was thrown by a {@code PrivilegedExceptionAction}.

return
the exception that was thrown by a {@code PrivilegedExceptionAction}.
since
Android 1.0

        return exception; // return ( getCause() instanceof Exception ) ?
        // getCause() : null;
    
public java.lang.StringtoString()
Returns a string containing a concise, human-readable description of this {@code PrivilegedActionException}.

return
a printable representation for this {@code PrivilegedActionException}.
since
Android 1.0

        String s = getClass().getName();
        return exception == null ? s : s + ": " + exception; //$NON-NLS-1$