1.4.5.2
This commit is contained in:
21
EdgeCommon/pkg/errors/detailed_error.go
Normal file
21
EdgeCommon/pkg/errors/detailed_error.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package errors
|
||||
|
||||
type DetailedError struct {
|
||||
msg string
|
||||
code string
|
||||
}
|
||||
|
||||
func (this *DetailedError) Error() string {
|
||||
return this.msg
|
||||
}
|
||||
|
||||
func (this *DetailedError) Code() string {
|
||||
return this.code
|
||||
}
|
||||
|
||||
func NewDetailedError(code string, errString string) *DetailedError {
|
||||
return &DetailedError{
|
||||
msg: errString,
|
||||
code: code,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user