Class OsdParseException

All Implemented Interfaces:
Serializable

public class OsdParseException extends RuntimeException
Thrown when OSD (Omnist Schema Definition) text fails to parse (omnist-spec §5).

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

This exception is thrown by OsdReader and OsdLexer for any structural, constraint, or lexical violation detected during parsing.

See Also:
  • Constructor Details

    • OsdParseException

      public OsdParseException(int line, int column, String code, String path, String message)
      Constructs a fully-detailed parse exception.
      Parameters:
      line - 1-based line number in the OSD source where the error was detected
      column - 1-based column number in the OSD source where the error was detected
      code - machine-readable error code identifying the violation category (e.g. schema.duplicate-record, schema.unknown-type)
      path - schema-path to the element that triggered the error (e.g. a record name or field path); use "$" when the error is at the schema root
      message - human-readable description of the error
    • OsdParseException

      public OsdParseException(int line, int column, String message)
      Constructs a parse exception with default code schema.parse-error and path "$". Convenience constructor for generic lexical errors from OsdLexer.
      Parameters:
      line - 1-based line number where the error was detected
      column - 1-based column number where the error was detected
      message - human-readable description of the error
  • Method Details

    • getLine

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

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

      public String getCode()
      Returns the machine-readable error code identifying the violation category, e.g. schema.duplicate-record or schema.unknown-type.
    • getPath

      public String getPath()
      Returns the schema-path to the element that triggered the error, e.g. a record name, a field path such as "MyRecord.myField", or "$" for root-level errors.