-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy patherrors.go
More file actions
34 lines (25 loc) · 709 Bytes
/
errors.go
File metadata and controls
34 lines (25 loc) · 709 Bytes
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
package fit
import "fmt"
// An IntegrityError reports that a header or file CRC check failed.
type IntegrityError string
func (e IntegrityError) Error() string {
return ("integrity error: " + string(e))
}
// A FormatError reports that the input is not valid FIT.
type FormatError string
func (e FormatError) Error() string {
return "invalid format: " + string(e)
}
// A NotSupportedError reports that the input uses a valid but unimplemented
// FIT feature.
type NotSupportedError string
func (e NotSupportedError) Error() string {
return "not supported: " + string(e)
}
type ioError struct {
op string
err error
}
func (e ioError) Error() string {
return fmt.Sprintf("%s: %v", e.op, e.err)
}