1 namespace System.Web.Util {
3 using System.Diagnostics.CodeAnalysis;
4 using System.Runtime.Serialization;
6 // Thrown when the AppVerifier fails an assert.
8 // This type is used solely as a support / diagnostics tool and will never appear over the normal course of an application.
9 // Specifically, it will never cross an AppDomain boundary, and we don't want to mark it as [Serializable] since that is
10 // essentially a public contract, and the AppVerifier feature has no public API surface. We want to retain the ability to
11 // change this feature on a whim without risk of breaking anybody.
12 [SuppressMessage("Microsoft.Usage", "CA2237:MarkISerializableTypesWithSerializable", Justification = "Doesn't need to be serializable.")]
13 internal sealed class AppVerifierException : Exception {
15 private readonly AppVerifierErrorCode _errorCode;
17 public AppVerifierException(AppVerifierErrorCode errorCode, string message)
20 _errorCode = errorCode;
23 private AppVerifierException(SerializationInfo info, StreamingContext context) : base(info, context) { }
25 public AppVerifierErrorCode ErrorCode {