Show / Hide Table of Contents

Class DataTooLongException

The exception that is thrown when the supplied data does not fit in the QR code.

Inheritance
object
Exception
SystemException
ArgumentException
DataTooLongException
Implements
ISerializable
Inherited Members
ArgumentException.GetObjectData(SerializationInfo, StreamingContext)
ArgumentException.Message
ArgumentException.ParamName
Exception.GetBaseException()
Exception.GetType()
Exception.ToString()
Exception.Data
Exception.HelpLink
Exception.HResult
Exception.InnerException
Exception.Source
Exception.StackTrace
Exception.TargetSite
Exception.SerializeObjectState
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
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 Source

DataTooLongException(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.

Implements

ISerializable

See Also

EncodeText(string, Ecc)
EncodeBinary(byte[], Ecc)
EncodeSegments(List<QrSegment>, Ecc, int, int, int, bool)
MakeSegmentsOptimally(string, Ecc, int, int)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX