Package com.kazforge.jsonapi.diagnostic
Class JsonApiDocumentReadException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.kazforge.jsonapi.diagnostic.JsonApiDocumentReadException
- All Implemented Interfaces:
Serializable
Failure while decoding or validating a JSON:API document.
Adapter-produced instances carry a stable CodecFailureCategory, a document-relative
RFC 6901 JSON Pointer ("" for the document root), and a payload-safe best-effort SourceLocation. For CodecFailureCategory.LOCAL_VALIDATION and CodecFailureCategory.AGGREGATE_VALIDATION, ruleCode() carries the core ValidationRuleCode; codec failures do not invent one.
This family ends at validated core-document construction. Domain binding, resource mapping,
registry, and representation failures use JsonApiMappingException instead.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionJsonApiDocumentReadException(CodecFailureCategory category, String jsonPointer, SourceLocation sourceLocation, @Nullable com.kazforge.jsonapi.core.validation.ValidationRuleCode ruleCode, String message) JsonApiDocumentReadException(CodecFailureCategory category, String jsonPointer, SourceLocation sourceLocation, @Nullable com.kazforge.jsonapi.core.validation.ValidationRuleCode ruleCode, String message, @Nullable Throwable cause) JsonApiDocumentReadException(CodecFailureCategory category, String jsonPointer, SourceLocation sourceLocation, String message) -
Method Summary
Modifier and TypeMethodDescriptioncategory()Decoding or validation stage that failed.Document-relative JSON Pointer;""identifies the document root.@Nullable com.kazforge.jsonapi.core.validation.ValidationRuleCoderuleCode()Core validation rule when one was reported, otherwisenull.Best-effort payload-safe source position, orSourceLocation.UNKNOWN.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
JsonApiDocumentReadException
public JsonApiDocumentReadException(CodecFailureCategory category, String jsonPointer, SourceLocation sourceLocation, String message) -
JsonApiDocumentReadException
public JsonApiDocumentReadException(CodecFailureCategory category, String jsonPointer, SourceLocation sourceLocation, @Nullable com.kazforge.jsonapi.core.validation.ValidationRuleCode ruleCode, String message) -
JsonApiDocumentReadException
public JsonApiDocumentReadException(CodecFailureCategory category, String jsonPointer, SourceLocation sourceLocation, @Nullable com.kazforge.jsonapi.core.validation.ValidationRuleCode ruleCode, String message, @Nullable Throwable cause)
-
-
Method Details
-
category
Decoding or validation stage that failed. -
jsonPointer
Document-relative JSON Pointer;""identifies the document root. -
sourceLocation
Best-effort payload-safe source position, orSourceLocation.UNKNOWN. -
ruleCode
public @Nullable com.kazforge.jsonapi.core.validation.ValidationRuleCode ruleCode()Core validation rule when one was reported, otherwisenull.
-