Class InvalidLetterException

All Implemented Interfaces:
Serializable

public final class InvalidLetterException extends LetterPdfException
Indicates invalid JSON, markup, model data or registered font configuration. fieldPath() identifies the failing input location; the exception message starts with that path followed by the diagnostic. Paths can refer to document fields, template nodes or font registrations rather than only JSON properties.
See Also:
  • Constructor Details

    • InvalidLetterException

      public InvalidLetterException(String fieldPath, String message)
      Creates a validation failure without an underlying cause. The message is prefixed with the supplied path; neither argument is validated here.
      Parameters:
      fieldPath - input location to retain and prefix in the message
      message - diagnostic explaining why that location is invalid
    • InvalidLetterException

      public InvalidLetterException(String fieldPath, String message, Throwable cause)
      Creates a validation failure retaining its input location and underlying cause. The message is prefixed with the supplied path; neither path nor message is validated here.
      Parameters:
      fieldPath - input location to retain and prefix in the message
      message - diagnostic explaining why that location is invalid
      cause - underlying parsing, decoding or validation failure, or null
  • Method Details

    • fieldPath

      public String fieldPath()
      Returns the input location supplied when this exception was constructed. Library-generated failures use paths such as document, indexed model fields, template..., or fonts[family].
      Returns:
      the retained field path; it can be null if supplied by a caller