-
-
Notifications
You must be signed in to change notification settings - Fork 52
/
errorcode_string.go
69 lines (63 loc) · 2.82 KB
/
errorcode_string.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// Code generated by "stringer -type=ErrorCode"; DO NOT EDIT.
package vz
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[ErrorInternal-1]
_ = x[ErrorInvalidVirtualMachineConfiguration-2]
_ = x[ErrorInvalidVirtualMachineState-3]
_ = x[ErrorInvalidVirtualMachineStateTransition-4]
_ = x[ErrorInvalidDiskImage-5]
_ = x[ErrorVirtualMachineLimitExceeded-6]
_ = x[ErrorNetworkError-7]
_ = x[ErrorOutOfDiskSpace-8]
_ = x[ErrorOperationCancelled-9]
_ = x[ErrorNotSupported-10]
_ = x[ErrorSave-11]
_ = x[ErrorRestore-12]
_ = x[ErrorRestoreImageCatalogLoadFailed-10001]
_ = x[ErrorInvalidRestoreImageCatalog-10002]
_ = x[ErrorNoSupportedRestoreImagesInCatalog-10003]
_ = x[ErrorRestoreImageLoadFailed-10004]
_ = x[ErrorInvalidRestoreImage-10005]
_ = x[ErrorInstallationRequiresUpdate-10006]
_ = x[ErrorInstallationFailed-10007]
_ = x[ErrorNetworkBlockDeviceNegotiationFailed-20001]
_ = x[ErrorNetworkBlockDeviceDisconnected-20002]
_ = x[ErrorUSBControllerNotFound-30001]
_ = x[ErrorDeviceAlreadyAttached-30002]
_ = x[ErrorDeviceInitializationFailure-30003]
_ = x[ErrorDeviceNotFound-30004]
}
const (
_ErrorCode_name_0 = "ErrorInternalErrorInvalidVirtualMachineConfigurationErrorInvalidVirtualMachineStateErrorInvalidVirtualMachineStateTransitionErrorInvalidDiskImageErrorVirtualMachineLimitExceededErrorNetworkErrorErrorOutOfDiskSpaceErrorOperationCancelledErrorNotSupportedErrorSaveErrorRestore"
_ErrorCode_name_1 = "ErrorRestoreImageCatalogLoadFailedErrorInvalidRestoreImageCatalogErrorNoSupportedRestoreImagesInCatalogErrorRestoreImageLoadFailedErrorInvalidRestoreImageErrorInstallationRequiresUpdateErrorInstallationFailed"
_ErrorCode_name_2 = "ErrorNetworkBlockDeviceNegotiationFailedErrorNetworkBlockDeviceDisconnected"
_ErrorCode_name_3 = "ErrorUSBControllerNotFoundErrorDeviceAlreadyAttachedErrorDeviceInitializationFailureErrorDeviceNotFound"
)
var (
_ErrorCode_index_0 = [...]uint16{0, 13, 52, 83, 124, 145, 177, 194, 213, 236, 253, 262, 274}
_ErrorCode_index_1 = [...]uint8{0, 34, 65, 103, 130, 154, 185, 208}
_ErrorCode_index_2 = [...]uint8{0, 40, 75}
_ErrorCode_index_3 = [...]uint8{0, 26, 52, 84, 103}
)
func (i ErrorCode) String() string {
switch {
case 1 <= i && i <= 12:
i -= 1
return _ErrorCode_name_0[_ErrorCode_index_0[i]:_ErrorCode_index_0[i+1]]
case 10001 <= i && i <= 10007:
i -= 10001
return _ErrorCode_name_1[_ErrorCode_index_1[i]:_ErrorCode_index_1[i+1]]
case 20001 <= i && i <= 20002:
i -= 20001
return _ErrorCode_name_2[_ErrorCode_index_2[i]:_ErrorCode_index_2[i+1]]
case 30001 <= i && i <= 30004:
i -= 30001
return _ErrorCode_name_3[_ErrorCode_index_3[i]:_ErrorCode_index_3[i+1]]
default:
return "ErrorCode(" + strconv.FormatInt(int64(i), 10) + ")"
}
}