Class ParseError

java.lang.Object
com.attribyte.parser.ParseError

public class ParseError extends Object
Reports an error during parse.
Author:
Matt Hamer
  • Field Details

    • message

      public final String message
      The error message.
    • exception

      public final Optional<Throwable> exception
      An optional exception;
    • position

      public final int position
      The character position in the parsed resource or 0 if unknown.
  • Constructor Details

    • ParseError

      public ParseError(String message, int position)
      Creates a parse error with a position.
      Parameters:
      message - The error message.
      position - The position.
    • ParseError

      public ParseError(String message)
      Creates a parse error with unknown position.
      Parameters:
      message - The error message.
    • ParseError

      public ParseError(String message, Throwable exception)
      Creates a parse error with an exception and unknown position.
      Parameters:
      message - The message.
      exception - An exception.
    • ParseError

      public ParseError(String message, Throwable exception, int position)
      Creates a parse error with an exception and position.
      Parameters:
      message - The message.
      exception - An exception.
      position - The position.
  • Method Details