15317bbafSopenharmony_ci/* 25317bbafSopenharmony_ci * Fast QR Code generator library 35317bbafSopenharmony_ci * 45317bbafSopenharmony_ci * Copyright (c) Project Nayuki. (MIT License) 55317bbafSopenharmony_ci * https://www.nayuki.io/page/fast-qr-code-generator-library 65317bbafSopenharmony_ci * 75317bbafSopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a copy of 85317bbafSopenharmony_ci * this software and associated documentation files (the "Software"), to deal in 95317bbafSopenharmony_ci * the Software without restriction, including without limitation the rights to 105317bbafSopenharmony_ci * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 115317bbafSopenharmony_ci * the Software, and to permit persons to whom the Software is furnished to do so, 125317bbafSopenharmony_ci * subject to the following conditions: 135317bbafSopenharmony_ci * - The above copyright notice and this permission notice shall be included in 145317bbafSopenharmony_ci * all copies or substantial portions of the Software. 155317bbafSopenharmony_ci * - The Software is provided "as is", without warranty of any kind, express or 165317bbafSopenharmony_ci * implied, including but not limited to the warranties of merchantability, 175317bbafSopenharmony_ci * fitness for a particular purpose and noninfringement. In no event shall the 185317bbafSopenharmony_ci * authors or copyright holders be liable for any claim, damages or other 195317bbafSopenharmony_ci * liability, whether in an action of contract, tort or otherwise, arising from, 205317bbafSopenharmony_ci * out of or in connection with the Software or the use or other dealings in the 215317bbafSopenharmony_ci * Software. 225317bbafSopenharmony_ci */ 235317bbafSopenharmony_ci 245317bbafSopenharmony_cipackage io.nayuki.fastqrcodegen; 255317bbafSopenharmony_ci 265317bbafSopenharmony_ci 275317bbafSopenharmony_ci/** 285317bbafSopenharmony_ci * Thrown when the supplied data does not fit any QR Code version. Ways to handle this exception include: 295317bbafSopenharmony_ci * <ul> 305317bbafSopenharmony_ci * <li><p>Decrease the error correction level if it was greater than {@code Ecc.LOW}.</p></li> 315317bbafSopenharmony_ci * <li><p>If the advanced {@code encodeSegments()} function with 6 arguments or the 325317bbafSopenharmony_ci * {@code makeSegmentsOptimally()} function was called, then increase the maxVersion argument 335317bbafSopenharmony_ci * if it was less than {@link QrCode#MAX_VERSION}. (This advice does not apply to the other 345317bbafSopenharmony_ci * factory functions because they search all versions up to {@code QrCode.MAX_VERSION}.)</p></li> 355317bbafSopenharmony_ci * <li><p>Split the text data into better or optimal segments in order to reduce the number of 365317bbafSopenharmony_ci * bits required. (See {@link QrSegmentAdvanced#makeSegmentsOptimally(String,QrCode.Ecc,int,int) 375317bbafSopenharmony_ci * QrSegmentAdvanced.makeSegmentsOptimally()}.)</p></li> 385317bbafSopenharmony_ci * <li><p>Change the text or binary data to be shorter.</p></li> 395317bbafSopenharmony_ci * <li><p>Change the text to fit the character set of a particular segment mode (e.g. alphanumeric).</p></li> 405317bbafSopenharmony_ci * <li><p>Propagate the error upward to the caller/user.</p></li> 415317bbafSopenharmony_ci * </ul> 425317bbafSopenharmony_ci * @see QrCode#encodeText(String, QrCode.Ecc) 435317bbafSopenharmony_ci * @see QrCode#encodeBinary(byte[], QrCode.Ecc) 445317bbafSopenharmony_ci * @see QrCode#encodeSegments(java.util.List, QrCode.Ecc) 455317bbafSopenharmony_ci * @see QrCode#encodeSegments(java.util.List, QrCode.Ecc, int, int, int, boolean) 465317bbafSopenharmony_ci * @see QrSegmentAdvanced#makeSegmentsOptimally(String, QrCode.Ecc, int, int) 475317bbafSopenharmony_ci */ 485317bbafSopenharmony_cipublic class DataTooLongException extends IllegalArgumentException { 495317bbafSopenharmony_ci 505317bbafSopenharmony_ci public DataTooLongException() {} 515317bbafSopenharmony_ci 525317bbafSopenharmony_ci 535317bbafSopenharmony_ci public DataTooLongException(String msg) { 545317bbafSopenharmony_ci super(msg); 555317bbafSopenharmony_ci } 565317bbafSopenharmony_ci 575317bbafSopenharmony_ci} 58