Repository navigation
Expand file tree
/
Copy patherrors.go
More file actions
45 lines (35 loc) · 1.86 KB
/
Copy patherrors.go
File metadata and controls
45 lines (35 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package qr
import "errors"
// Sentinel errors. Every error returned by this package wraps one of them, so
// callers can test for a category with errors.Is, with two exceptions: the
// Write methods return the error of their io.Writer, wrapped with %w, and a
// BatchResult reports a job that panicked, a bug in this package, with an
// error of its own.
var (
// ErrInvalidArgument reports an invalid option or argument, such as a mask
// outside 0-7, an unknown error correction level or a zero scale.
ErrInvalidArgument = errors.New("qr: invalid argument")
// ErrInvalidVersion reports a version range outside
// [MinVersion, MaxVersion] or with min > max.
ErrInvalidVersion = errors.New("qr: invalid version")
// ErrDataTooLong reports data that does not fit in the largest allowed
// version at the requested error correction level.
ErrDataTooLong = errors.New("qr: data too long")
// ErrUnencodableChar reports a character that the requested segment mode
// cannot represent.
ErrUnencodableChar = errors.New("qr: unencodable character")
// ErrLogoTooLarge reports a logo that covers more modules than the
// symbol's error correction can be expected to recover. See WithLogo.
ErrLogoTooLarge = errors.New("qr: logo too large")
// ErrUnreadable reports a rendering that Code.Verify could not read
// back, or whose colors phone scanners are likely to fail on.
ErrUnreadable = errors.New("qr: rendering is not readable")
// ErrNotFound reports that no QR Code could be located in an image.
ErrNotFound = errors.New("qr: no QR code found")
// ErrDecodeFailed reports a located symbol that could not be decoded:
// too many errors, unreadable format information, or a malformed
// bitstream.
ErrDecodeFailed = errors.New("qr: decode failed")
// ErrUnsupported reports a symbol feature this decoder does not handle.
ErrUnsupported = errors.New("qr: unsupported symbol")
)