-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.go
More file actions
32 lines (22 loc) · 1.4 KB
/
errors.go
File metadata and controls
32 lines (22 loc) · 1.4 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
package epp
import "errors"
var (
// ErrInvalidPVN indicates the Packet Version Number is not 7 (0111).
ErrInvalidPVN = errors.New("invalid PVN: must be 7 for encapsulation packets")
// ErrInvalidProtocolID indicates the Protocol ID is out of range.
ErrInvalidProtocolID = errors.New("invalid protocol ID: must be in the range 0-7")
// ErrIdleWithData indicates an idle packet was created with a non-empty data zone.
ErrIdleWithData = errors.New("idle packet must not contain user data")
// ErrEmptyData indicates a non-idle packet has no data.
ErrEmptyData = errors.New("non-idle packet must contain data")
// ErrDataTooShort indicates the provided data is too short for decoding.
ErrDataTooShort = errors.New("provided data is too short to decode the packet")
// ErrPacketLengthMismatch indicates the declared packet length does not match the actual size.
ErrPacketLengthMismatch = errors.New("packet length field does not match actual packet size")
// ErrPacketTooLarge indicates the packet exceeds the maximum size for its header format.
ErrPacketTooLarge = errors.New("packet size exceeds the maximum for the selected header format")
// ErrNilPacket indicates a nil packet was provided.
ErrNilPacket = errors.New("packet must not be nil")
// ErrInvalidLengthOfLength indicates the Length of Length field is not 0 or 1.
ErrInvalidLengthOfLength = errors.New("invalid length of length: must be 0 or 1")
)