File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1
1
//
2
- // Copyright (C) 2020-2021 IOTech Ltd
2
+ // Copyright (C) 2020-2025 IOTech Ltd
3
3
//
4
4
// SPDX-License-Identifier: Apache-2.0
5
5
@@ -51,6 +51,8 @@ type EdgeX interface {
51
51
Message () string
52
52
// Code returns the status code of this error.
53
53
Code () int
54
+ // Kind returns the error kind of this error.
55
+ Kind () string
54
56
}
55
57
56
58
// CommonEdgeX generalizes an error structure which can be used for any type of EdgeX error.
@@ -130,6 +132,11 @@ func (ce CommonEdgeX) Code() int {
130
132
return ce .code
131
133
}
132
134
135
+ // Kind returns the error kind of this error.
136
+ func (ce CommonEdgeX ) Kind () string {
137
+ return string (ce .kind )
138
+ }
139
+
133
140
// Unwrap retrieves the next nested error in the wrapped error chain.
134
141
// This is used by the new wrapping and unwrapping features available in Go 1.13 and aids in traversing the error chain
135
142
// of wrapped errors.
You can’t perform that action at this time.
0 commit comments