Class WriteException

All Implemented Interfaces:
Serializable

public class WriteException extends RuntimeException
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 Details

    • WriteException

      public WriteException(String message)
      Constructs a write exception with no recorded adjustments.
      Parameters:
      message - a human-readable description of the failure
    • WriteException

      public 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).
      Parameters:
      message - a human-readable description of the failure
      report - the adjustments recorded before this exception was thrown
  • Method Details

    • report

      public WriteReport report()
      Returns the adjustments recorded before this exception was thrown.