All Implemented Interfaces:
Serializable

public final class FormatExceptionextends ReaderException
Thrown when a barcode was successfully detected, but some aspect of the content did not conform to the barcode's format rules. This could have been due to a mis-detection.
See Also:
  • Field Details

    • INSTANCE

      private static final FormatException INSTANCE
      Shared instance, as the exception carries no message.
  • Constructor Details

    • FormatException

      private FormatException()
      Creates the shared instance.
    • FormatException

      private FormatException(Throwable cause)
      Records what went wrong.
      Parameters:
      cause - the underlying failure
  • Method Details

    • getFormatInstance

      public static FormatException getFormatInstance()
      Get the shared instance, or a fresh one when stack traces are enabled.
      Returns:
      the format instance
    • getFormatInstance

      public static FormatException getFormatInstance(Throwable cause)
      Get an instance wrapping the given cause.
      Parameters:
      cause - underlying throwable wrapped by the new exception
      Returns:
      the format instance