This documentation is archived and is not being maintained.

ParserError Constructor (String, String, Int32)

Initializes a new instance of the ParserError class by using the specified error text, virtual path, and source line number.

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

public:
ParserError(
	String^ errorText, 
	String^ virtualPath, 
	int line
)

Parameters

errorText
Type: System::String

The error message text.

virtualPath
Type: System::String

The virtual path of the file being parsed when the error occurred.

line
Type: System::Int32

The line number of the error source.

Use the ParserError constructor to initialize a ParserError object with custom settings. The ParserError constructor has the following properties:

  • The ErrorText property, which is a string containing the error message that is related to the parser error.

  • The VirtualPath property, which is a read-only string that specifies the virtual path of the file that contains the parser error.

  • The Line property, which is the line number within the file at which this ParserError object was thrown.

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
Show: