Class DocumentParseException

All Implemented Interfaces:
Serializable

public class DocumentParseException extends RuntimeException
Structured exception thrown when a document fails to parse, violates safety limits, or contains invalid/unsupported structures across format codecs (omnist-spec §7, §8).

Callers that need to surface document parse errors should inspect:

  • getPath() — JSONPath-style document path where the error was detected (e.g. "$" or "$.a[0].b")
  • getCode() — machine-readable error code (e.g. document.limit.depth, document.unlabeled-element)
  • Throwable.getMessage() — human-readable message explaining the violation
See Also:
  • Constructor Details

    • DocumentParseException

      public DocumentParseException(String path, String code, String message)
      Constructs a document parse exception with path, code, and message.
      Parameters:
      path - the document path where the violation was detected; use "$" for root-level errors
      code - the machine-readable error code identifying the error category
      message - human-readable explanation of the error
    • DocumentParseException

      public DocumentParseException(String path, String code, String message, Throwable cause)
      Constructs a document parse exception with path, code, message, and cause.
      Parameters:
      path - the document path where the violation was detected; use "$" for root-level errors
      code - the machine-readable error code identifying the error category
      message - human-readable explanation of the error
      cause - the underlying exception
  • Method Details

    • getPath

      public String getPath()
      Returns the JSONPath-style document path where the error was detected.
    • getCode

      public String getCode()
      Returns the machine-readable error code identifying the violation category.