Class OmlParseException

All Implemented Interfaces:
Serializable

public class OmlParseException extends RuntimeException
Structured exception thrown when an OML document fails to parse (omnist-spec ยง8).

Callers that need to surface parse errors to users should inspect:

This exception is thrown by OmlLexer and OmlReader for any lexical or structural violation, including unterminated strings, unexpected tokens, reserved-word labels, empty arrays, and exceeded safety limits.

See Also:
  • Constructor Details

    • OmlParseException

      public OmlParseException(int line, int column, String code, String message)
      Constructs an OML parse exception with full location and code details.
      Parameters:
      line - 1-based line number in the OML source where the error was detected
      column - 1-based column number in the OML source where the error was detected
      code - machine-readable error code identifying the violation category, e.g. parse.unterminated-string, document.limit.depth
      message - human-readable description of the error
  • Method Details

    • getLine

      public int getLine()
      Returns the 1-based line number in the OML source where the error was detected.
    • getColumn

      public int getColumn()
      Returns the 1-based column number in the OML source where the error was detected.
    • getCode

      public String getCode()
      Returns the machine-readable error code identifying the violation category, e.g. parse.unterminated-string or document.limit.int-digits.
    • getPath

      public String getPath()
      Returns a location string in the form "line:column", identical to the prefix of Throwable.getMessage().