-
Notifications
You must be signed in to change notification settings - Fork 176
Expand file tree
/
Copy patherror.go
More file actions
89 lines (72 loc) · 1.88 KB
/
Copy patherror.go
File metadata and controls
89 lines (72 loc) · 1.88 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// Copyright 2021 Synology Inc.
package utils
import (
"fmt"
)
type OutOfFreeSpaceError string
type AlreadyExistError string
type BadParametersError string
type NoSuchLunError string
type LunReachMaxCountError string
type TargetReachMaxCountError string
type NoSuchSnapshotError string
type BadLunTypeError string
type SnapshotReachMaxCountError string
type IscsiDefaultError struct {
ErrCode int
}
type NoSuchShareError string
type ShareReachMaxCountError string
type ShareSystemBusyError string
type ShareDefaultError struct {
ErrCode int
}
func (_ OutOfFreeSpaceError) Error() string {
return "Out of free space"
}
func (_ AlreadyExistError) Error() string {
return "Already Existed"
}
func (_ BadParametersError) Error() string {
return "Invalid input value"
}
// ISCSI errors
func (_ NoSuchLunError) Error() string {
return "No such LUN"
}
func (_ LunReachMaxCountError) Error() string {
return "Number of LUN reach limit"
}
func (_ TargetReachMaxCountError) Error() string {
return "Number of target reach limit"
}
func (_ NoSuchSnapshotError) Error() string {
return "No such snapshot uuid"
}
func (_ BadLunTypeError) Error() string {
return "Bad LUN type"
}
func (_ SnapshotReachMaxCountError) Error() string {
return "Number of snapshot reach limit"
}
func (e IscsiDefaultError) Error() string {
return fmt.Sprintf("ISCSI API error. Error code: %d", e.ErrCode)
}
// Share errors
func (_ NoSuchShareError) Error() string {
return "No such share"
}
func (_ ShareReachMaxCountError) Error() string {
return "Number of share reach limit"
}
func (_ ShareSystemBusyError) Error() string {
return "Share system is temporary busy"
}
func (e ShareDefaultError) Error() string {
return fmt.Sprintf("Share API error. Error code: %d", e.ErrCode)
}
// NFS errors
type NfsSystemBusyError string
func (_ NfsSystemBusyError) Error() string {
return "NFS system is temporarily busy (error 2370)"
}