The SecurityExceptionEx Class of the com.ms.security package represents security exceptions that are thrown by a component of the security system to indicate a security violation.
public class SecurityExceptionEx extends SecurityException { // Constructors public SecurityExceptionEx(); public SecurityExceptionEx(String s); // Methods public String getFailingClassName(); public String getFailingMethodName(); public String toString(); }
The SecurityExceptionEx class differs from the standard java.lang.SecurityException class in that it can also keep track of who caused the security violation.
This extended behavior of a SecurityExceptionEx object is currently useful only within the IPermission.check method. If an IPermission.check method, which has been called by the Microsoft VM in response to one of the PolicyEngine.checkPermission APIs, throws an instance of SecurityExceptionEx, the Microsoft VM will fill in the class and method names of the stack frame that failed the check. SecurityExceptionEx instances that are thrown in other contexts do not contain the class and method name information, and the getFailingClassName and getFailingMethodName methods will then return null.
SecurityException | +--SecurityExceptionEx