This repository has been archived by the owner on Nov 30, 2023. It is now read-only.
/
error.go
77 lines (60 loc) · 2.13 KB
/
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
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
package azuremachine
import (
"github.com/giantswarm/microerror"
)
var invalidConfigError = µerror.Error{
Kind: "invalidConfigError",
}
// IsInvalidConfig asserts invalidConfigError.
func IsInvalidConfig(err error) bool {
return microerror.Cause(err) == invalidConfigError
}
var parsingFailedError = µerror.Error{
Kind: "parsingFailedError",
}
// IsParsingFailed asserts parsingFailedError.
func IsParsingFailed(err error) bool {
return microerror.Cause(err) == parsingFailedError
}
var unsupportedFailureDomainError = µerror.Error{
Kind: "unsupportedFailureDomainError",
}
// IsUnsupportedFailureDomainError asserts unsupportedFailureDomainError.
func IsUnsupportedFailureDomainError(err error) bool {
return microerror.Cause(err) == unsupportedFailureDomainError
}
var locationWithNoFailureDomainSupportError = µerror.Error{
Kind: "locationWithNoFailureDomainSupportError",
}
// IsLocationWithNoFailureDomainSupportError asserts locationWithNoFailureDomainSupportError.
func IsLocationWithNoFailureDomainSupportError(err error) bool {
return microerror.Cause(err) == locationWithNoFailureDomainSupportError
}
var failureDomainWasChangedError = µerror.Error{
Kind: "failureDomainWasChangedError",
}
// IsFailureDomainWasChangedError asserts failureDomainWasChangedError.
func IsFailureDomainWasChangedError(err error) bool {
return microerror.Cause(err) == failureDomainWasChangedError
}
var locationWasChangedError = µerror.Error{
Kind: "locationWasChangedError",
}
// IsLocationWasChangedError asserts locationWasChangedError.
func IsLocationWasChangedError(err error) bool {
return microerror.Cause(err) == locationWasChangedError
}
var unexpectedLocationError = µerror.Error{
Kind: "unexpectedLocationError",
}
// IsUnexpectedLocationError asserts unexpectedLocationError.
func IsUnexpectedLocationError(err error) bool {
return microerror.Cause(err) == unexpectedLocationError
}
var sshFieldIsSetError = µerror.Error{
Kind: "sshFieldIsSetError",
}
// IsSSHFieldIsSetError asserts sshFieldIsSetError.
func IsSSHFieldIsSetError(err error) bool {
return microerror.Cause(err) == sshFieldIsSetError
}