File: error.go

package info (click to toggle)
golang-github-aws-aws-sdk-go-v2 1.30.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 662,428 kB
  • sloc: java: 16,875; makefile: 432; sh: 175
file content (23 lines) | stat: -rw-r--r-- 512 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package eventstream

import "fmt"

// LengthError provides the error for items being larger than a maximum length.
type LengthError struct {
	Part  string
	Want  int
	Have  int
	Value interface{}
}

func (e LengthError) Error() string {
	return fmt.Sprintf("%s length invalid, %d/%d, %v",
		e.Part, e.Want, e.Have, e.Value)
}

// ChecksumError provides the error for message checksum invalidation errors.
type ChecksumError struct{}

func (e ChecksumError) Error() string {
	return "message checksum mismatch"
}