Class PayloadFormatException

All Implemented Interfaces:
Serializable

public class PayloadFormatException extends PdfTemplateException
An exception indicating that an invalid payload representation has been provided to either setPayloadJson or setPayloadMap and therefore a payload instance could not be created.
See Also:
Serialized Form
  • Constructor Details

    • PayloadFormatException

      public PayloadFormatException(String json, Throwable t)
      Invoke this constructor when a JSON representation failed to create a payload instance.
      Parameters:
      json - the failing JSON string
      t - the exception that was raised when trying to convert JSON to payload class
    • PayloadFormatException

      public PayloadFormatException(Map map, Throwable t)
      Invoke this constructor when a Java map representation failed to create a payload instance.
      Parameters:
      map - the failing Java map
      t - the exception that was raised when trying to convert the map to payload class
  • Method Details

    • getPayloadMap

      public Map getPayloadMap()
      Returns the map that caused the failure, or null if the failure was caused by a JSON string
      Returns:
      the failing map or null
    • getPayloadJson

      public String getPayloadJson()
      Returns the JSON string that caused the failure, or null if the failure was caused by a Java map
      Returns:
      the failing JSON string or null
    • getPayloadSource

      public Object getPayloadSource()
      Returns the representation that caused the failure - it could be a JSON string or a Java map.
      Returns:
      the failing JSON string or Java map