In This Article

ParseError Class

Represents an object that indicates a message, warning or error related to parsing.

public class ParseError : IParseError
Inheritance:
object object
Implements:
IParseError

Constructors

ParseError()

Initializes a new instance of the ParseError class.

public ParseError()

ParseError(ParseErrorLevel, string, TextPositionRange)

Initializes a new instance of the ParseError class.

public ParseError(ParseErrorLevel level, string description, TextPositionRange positionRange)
Parameter Type Description
level ParseErrorLevel

A ParseErrorLevel indicating the error level.

description string

The description of the error, which is displayed in the user interface.

positionRange TextPositionRange

The TextPositionRange of the error.

Properties

ClassificationType

Gets or sets the optional IClassificationType associated with the error.

public IClassificationType ClassificationType { get; set; }

Property Value

IClassificationType:

The optional IClassificationType associated with the error.

Description

Gets or sets the description of the error, which is displayed in the user interface.

public string Description { get; set; }

Property Value

string:

The description of the error, which is displayed in the user interface.

Level

Gets or sets a ParseErrorLevel indicating the error level.

public ParseErrorLevel Level { get; set; }

Property Value

ParseErrorLevel:

A ParseErrorLevel indicating the error level.

PositionRange

Gets or sets the TextPositionRange of the error.

public TextPositionRange PositionRange { get; set; }

Property Value

TextPositionRange:

The TextPositionRange of the error.

Remarks

If no text position data is available for the error, the value should be TextPositionRange.Empty.

Methods

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)
Parameter Type Description
obj object

The object to compare with the current object.

Returns

bool:

true if the specified object is equal to the current object; otherwise, false.

Exceptions

Type Condition
NullReferenceException

The obj parameter is null.

GetHashCode()

Serves as a hash function for a particular type.

public override int GetHashCode()

Returns

int:

A hash code for the current object.

ToString()

Returns a String that represents the current Object.

public override string ToString()

Returns

string:

A String that represents the current Object.

Inherited Members