java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
io.nayuki.qrcodegen.DataTooLongException
- All Implemented Interfaces:
Serializable
Thrown when the supplied data does not fit any QR Code version. Ways to handle this exception include:
Decrease the error correction level if it was greater than
Ecc.LOW
.If the advanced
encodeSegments()
function with 6 arguments or themakeSegmentsOptimally()
function was called, then increase the maxVersion argument if it was less thanQrCode.MAX_VERSION
. (This advice does not apply to the other factory functions because they search all versions up toQrCode.MAX_VERSION
.)Split the text data into better or optimal segments in order to reduce the number of bits required. (See
QrSegmentAdvanced.makeSegmentsOptimally()
.)Change the text or binary data to be shorter.
Change the text to fit the character set of a particular segment mode (e.g. alphanumeric).
Propagate the error upward to the caller/user.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
DataTooLongException
public DataTooLongException() -
DataTooLongException
-