The Labs \ Source Viewer \ SSCLI \ System.Security.Policy \ PolicyException

  1. // ==++==
  2. //
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. //
  14. // ==--==
  15. // PolicyException.cs
  16. //
  17. // Use this class to throw a PolicyException
  18. //
  19. namespace System.Security.Policy
  20. {
  21.    
  22.     using System;
  23.     using System.Runtime.Serialization;
  24.     [Serializable()]
  25.     [System.Runtime.InteropServices.ComVisible(true)]
  26.     public class PolicyException : SystemException
  27.     {
  28.        
  29.         public PolicyException() : base(Environment.GetResourceString("Policy_Default"))
  30.         {
  31.             HResult = __HResults.CORSEC_E_POLICY_EXCEPTION;
  32.         }
  33.        
  34.        
  35.         public PolicyException(string message) : base(message)
  36.         {
  37.             HResult = __HResults.CORSEC_E_POLICY_EXCEPTION;
  38.         }
  39.        
  40.        
  41.         public PolicyException(string message, Exception exception) : base(message, exception)
  42.         {
  43.             HResult = __HResults.CORSEC_E_POLICY_EXCEPTION;
  44.         }
  45.        
  46.         protected PolicyException(SerializationInfo info, StreamingContext context) : base(info, context)
  47.         {
  48.         }
  49.        
  50.         internal PolicyException(string message, int hresult) : base(message)
  51.         {
  52.             HResult = hresult;
  53.         }
  54.        
  55.         internal PolicyException(string message, int hresult, Exception exception) : base(message, exception)
  56.         {
  57.             HResult = hresult;
  58.         }
  59.        
  60.     }
  61.    
  62. }

Developer Fusion