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

Boolean:

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

Int32:

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