-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.go
More file actions
21 lines (19 loc) · 1.22 KB
/
Copy patherrors.go
File metadata and controls
21 lines (19 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package marc
import "errors"
// Sentinel errors ported from pymarc/exceptions.py. Wrap with fmt.Errorf("%w: ...", ErrX)
// for dynamic detail, and check with errors.Is.
var (
ErrRecordLengthInvalid = errors.New("invalid record length in first 5 bytes of record")
ErrTruncatedRecord = errors.New("record length in leader is greater than the length of data")
ErrEndOfRecordNotFound = errors.New("unable to locate end of record marker")
ErrRecordLeaderInvalid = errors.New("unable to extract record leader")
ErrRecordDirectoryInvalid = errors.New("invalid directory")
ErrNoFieldsFound = errors.New("unable to locate fields in record data")
ErrBaseAddressInvalid = errors.New("base address exceeds size of record")
ErrBaseAddressNotFound = errors.New("unable to locate base address of record")
ErrWriteNeedsRecord = errors.New("write requires a *marc.Record argument")
ErrNoActiveFile = errors.New("there is no active file to write to")
ErrFieldNotFound = errors.New("record does not contain the specified field")
ErrBadLeaderValue = errors.New("bad leader value")
ErrMissingLinkedFields = errors.New("field includes a subfield 6 but no linked fields could be found")
)