Export (0) Print
Expand All

ParserError Class

Note: This class is new in the .NET Framework version 2.0.

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

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

[SerializableAttribute] 
public sealed class ParserError
/** @attribute SerializableAttribute() */ 
public final class ParserError
SerializableAttribute 
public final 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 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

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

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2014 Microsoft