Class InvalidSyntaxException

java.lang.Object
java.lang.Throwable
java.lang.Exception
dev.zemco.codegame.compilation.InvalidSyntaxException
All Implemented Interfaces:
Serializable

public class InvalidSyntaxException extends Exception
Thrown when a source code contains an invalid syntax.
Author:
Erik Zemčík
See Also:
  • Constructor Details

    • InvalidSyntaxException

      public InvalidSyntaxException(String message, int linePosition)
      Creates an instance of InvalidSyntaxException.
      Parameters:
      message - detail message containing information about the invalid syntax
      linePosition - zero-based line position where the syntax error is located
      Throws:
      IllegalArgumentException - if linePosition is not a positive integer
    • InvalidSyntaxException

      public InvalidSyntaxException(String message, Throwable cause, int linePosition)
      Creates an instance of InvalidSyntaxException.
      Parameters:
      message - detail message containing information about the invalid syntax
      cause - cause of the invalid syntax error
      linePosition - zero-based line position where the syntax error is located
      Throws:
      IllegalArgumentException - if linePosition is not a positive integer
  • Method Details

    • getLinePosition

      public int getLinePosition()
      Returns the zero-based line position where the syntax error is located.
      Returns:
      zero-based line position