Files
EdgeCommon/pkg/errors/detailed_error.go

22 lines
333 B
Go
Raw Permalink Normal View History

2021-01-03 20:18:21 +08:00
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
}
2023-08-08 18:50:12 +08:00
func NewDetailedError(code string, errString string) *DetailedError {
2021-01-03 20:18:21 +08:00
return &DetailedError{
2023-08-08 18:50:12 +08:00
msg: errString,
2021-01-03 20:18:21 +08:00
code: code,
}
}