ParserError Constructor (String, String, Int32)
Collapse the table of content
Expand the table of content

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


Type: System.String

The error message text.

Type: System.String

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

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, whichis the line number within the file at which this ParserError object was thrown.

.NET Framework
Available since 2.0
Return to top
© 2015 Microsoft