Adding an error code to the parse error

SyntaxEditor for WPF Forum

Posted 2 years ago by Daisuke Nakada
Version: 17.2.0664
Avatar

Hi,

For adding an error, I'm calling the ReportError method on IParseError within the grammar callbacks like this:

state.ReportError(ParseErrorLevel.Error, ERROR_MESSAGE, errorToken);

 

I want to have "error code" in addition to error level and description.

And later I want to retrieve error level, description, and error code and show them on my original error list window.

 

I would like to know what is the best way to do this.

I couldn't find error code property in the IParseError interface.

 

Thank you.

Comments (2)

Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Our default ParseError class that implements IParseError doesn't have an error code, but you could make a class that inherits ParseError and add ErrorCode yourself to it.  Then just call the state.ReportError overload that takes an IParseError.


Actipro Software Support

Posted 2 years ago by Daisuke Nakada
Avatar

Thank you.

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.