Package dev.omnist.document
Class DocumentParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
dev.omnist.document.DocumentParseException
- All Implemented Interfaces:
Serializable
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 Summary
ConstructorsConstructorDescriptionDocumentParseException(String path, String code, String message) Constructs a document parse exception with path, code, and message.DocumentParseException(String path, String code, String message, Throwable cause) Constructs a document parse exception with path, code, message, and cause. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
DocumentParseException
Constructs a document parse exception with path, code, and message.- Parameters:
path- the document path where the violation was detected; use"$"for root-level errorscode- the machine-readable error code identifying the error categorymessage- human-readable explanation of the error
-
DocumentParseException
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 errorscode- the machine-readable error code identifying the error categorymessage- human-readable explanation of the errorcause- the underlying exception
-
-
Method Details
-
getPath
Returns the JSONPath-style document path where the error was detected. -
getCode
Returns the machine-readable error code identifying the violation category.
-