Export (0) Print
Expand All

ParserError Class

Represents a parser error or warning. This class cannot be inherited.

Namespace:  System.Web
Assembly:  System.Web (in System.Web.dll)

[SerializableAttribute]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class ParserError

A ParserError object represents an error that is created when an HttpParseException exception is thrown. A parser error object can contain error message text, a virtual path to the file where the error occurred, and the subsequent line number of the error in that file. If more than one parser error occurs or you want to store multiple parser errors in a centralized location, use the ParserErrorCollection object.

A parser error is of the type HttpException. For more information on exceptions and how to handle them, go to MSDN Library.

The following code example demonstrates how to add a new parser error to a ParserErrorCollection object.

// Add a ParserError to the collection.
collection.Add(new ParserError("ErrorName", "Path", 1));

System.Object
  System.Web.ParserError

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft