-
Notifications
You must be signed in to change notification settings - Fork 0
/
error.go
48 lines (37 loc) · 947 Bytes
/
error.go
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
46
47
48
package macpot
import "fmt"
// OutOfBoundError occurs when we try to access an unknown octet.
type OutOfBoundError struct {
TargetIndex int
}
func (e OutOfBoundError) Error() string {
return fmt.Sprintf("unable to set octet %d", e.TargetIndex)
}
// OUIError occurs when something goes wrong parsing the provided OUI.
type OUIError struct {
Message string
}
func (e OUIError) Error() string {
return e.Message
}
// NICError occurs when something goes wrong parsing the provided NIC.
type NICError struct {
Message string
}
func (e NICError) Error() string {
return e.Message
}
// IPv4Error occurs when something goes wrong parsing the provided IPv4.
type IPv4Error struct {
Message string
}
func (e IPv4Error) Error() string {
return e.Message
}
// AddressError occurs when something goes wrong parsing the provided Address.
type AddressError struct {
Message string
}
func (e AddressError) Error() string {
return e.Message
}