PolicyException Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The exception that is thrown when policy forbids code to run.
public ref class PolicyException : SystemException
[System.Serializable]
public class PolicyException : SystemException
public class PolicyException : SystemException
[<System.Serializable>]
type PolicyException = class
inherit SystemException
type PolicyException = class
inherit SystemException
Public Class PolicyException
Inherits SystemException
- Inheritance
- Attributes
Remarks
This exception is typically thrown when the code requests more permissions than the policy will grant or the policy is configured to prohibit running the code.
PolicyException uses the HRESULT CORSEC_E_POLICY_EXCEPTION.
For a list of initial property values for an instance of PolicyException, see the constructor.
Constructors
| Name | Description |
|---|---|
| PolicyException() |
Initializes a new instance of the PolicyException class with default properties. |
| PolicyException(SerializationInfo, StreamingContext) |
Obsolete.
Initializes a new instance of the PolicyException class with serialized data. |
| PolicyException(String, Exception) |
Initializes a new instance of the PolicyException class with a specified error message and a reference to the inner exception that is the cause of this exception. |
| PolicyException(String) |
Initializes a new instance of the PolicyException class with a specified error message. |