ParserError Class
Represents a parser error or warning. This class cannot be inherited.
Assembly: System.Web (in System.Web.dll)
The ParserError type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | ParserError() | Initializes a new instance of the ParserError class. |
![]() | ParserError(String, String, Int32) | Initializes a new instance of the ParserError class by using the specified error text, virtual path, and source line number. |
| Name | Description | |
|---|---|---|
![]() | ErrorText | Gets or sets a string that represents the error for the ParserError object. |
![]() | Line | Gets or sets the line number of the source at which the error occurs. |
![]() | VirtualPath | Gets or set the virtual path of the file that was being parsed when the error occurred. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
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.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.


