Class DataTooLongException
- Namespace
- Net.Codecrete.QrCodeGenerator
- Assembly
- QrCodeGenerator.dll
The exception that is thrown when the supplied data does not fit in the QR code.
public class DataTooLongException : ArgumentException, ISerializable
- Inheritance
-
DataTooLongException
- Implements
- Inherited Members
Remarks
Ways to handle this exception include:
- Decrease the error correction level (if it was greater than Low)
- Increase the
maxVersionargument (if it was less than MaxVersion). This advice applies to the advanced factory functions EncodeSegments(List<QrSegment>, Ecc, int, int, int, bool) and MakeSegmentsOptimally(string, Ecc, int, int) only. Other factory functions automatically try all versions up to MaxVersion. - Split the text into several segments and encode them using different encoding modes (see MakeSegmentsOptimally(string, Ecc, int, int).)
- Make the text or binary data shorter.
- Change the text to fit the character set of a particular segment mode (e.g. alphanumeric).
- Reject the data and notify the caller/user.
Constructors
DataTooLongException(string)
Initializes a new instance of the DataTooLongException class.
public DataTooLongException(string message)
Parameters
messagestringThe message that describes the error.