/// <summary> /// Initializes a new instance of the <see cref="VLogErrorCode"/> class. /// </summary> /// <param name="type">The type of the error.</param> internal VLogErrorCode(VLogErrorTypes type) { switch (type) { case VLogErrorTypes.ServerSideIIS: this.Code = 500; this.ExcludeBrowserCapabilities = true; break; case VLogErrorTypes.ServerSideSql: this.Code = 500; this.ExcludeBrowserCapabilities = true; this.ExcludeServerVariables = true; this.ExcludeQueryStringVariables = true; this.ExcludeFormVariables = true; this.ExcludeApplicationStateVariables = true; this.ExcludeCookies = true; this.ExcludeSessionStateVariables = true; this.ExcludeContextItems = true; break; case VLogErrorTypes.ClientSide: this.Code = JsException.DefaultExceptionStatusCode; this.ExcludeBrowserCapabilities = false; this.ExcludeServerVariables = true; this.ExcludeQueryStringVariables = true; this.ExcludeFormVariables = true; this.ExcludeApplicationStateVariables = true; this.ExcludeCookies = true; this.ExcludeSessionStateVariables = true; this.ExcludeContextItems = true; break; } }
/// <summary> /// Gets the web error code or default. /// </summary> /// <param name="errornumber">The error number.</param> /// <param name="errortype">The error type.</param> /// <returns>The instance of the Web Error Code</returns> private static VLogErrorCode GetWebErrorCodeOrDefault(int errornumber, VLogErrorTypes errortype) { VLogErrorCode error; if (VLog.WebErrorCodes.TryGetValue(errornumber, out error)) { return error; } return new VLogErrorCode(errortype); }