Class DataTooLongException
The exception that is thrown when the supplied data does not fit in the QR code.
Implements
Inherited Members
Namespace: Net.Codecrete.QrCodeGenerator
Assembly: QrCodeGenerator.dll
Syntax
public class DataTooLongException : ArgumentException, ISerializable
Remarks
Ways to handle this exception include:
- Decrease the error correction level (if it was greater than Low)
- Increase the
maxVersion
argument (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
| Edit this page View SourceDataTooLongException(string)
Initializes a new instance of the DataTooLongException class.
Declaration
public DataTooLongException(string message)
Parameters
Type | Name | Description |
---|---|---|
string | message | The message that describes the error. |