Package dev.omnist.codec
Class WriteException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
dev.omnist.codec.WriteException
- All Implemented Interfaces:
Serializable
Thrown by a codec's
write/check path when a document cannot be
written to the target format at all (e.g. TOML requires a top-level table), or
when a strict-mode write encountered an adjustment it was told not to tolerate.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionWriteException(String message) Constructs a write exception with no recorded adjustments.WriteException(String message, WriteReport report) Constructs a write exception carrying the adjustments that led to it (typically used in strict mode, where any adjustment is itself the failure). -
Method Summary
Modifier and TypeMethodDescriptionreport()Returns the adjustments recorded before this exception was thrown.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
WriteException
Constructs a write exception with no recorded adjustments.- Parameters:
message- a human-readable description of the failure
-
WriteException
Constructs a write exception carrying the adjustments that led to it (typically used in strict mode, where any adjustment is itself the failure).- Parameters:
message- a human-readable description of the failurereport- the adjustments recorded before this exception was thrown
-
-
Method Details
-
report
Returns the adjustments recorded before this exception was thrown.
-