Files
EdgeAPI/internal/errors/detailed_error.go

22 lines
333 B
Go
Raw Normal View History

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:36:24 +08:00
func NewDetailedError(code string, errString string) *DetailedError {
return &DetailedError{
2023-08-08 18:36:24 +08:00
msg: errString,
code: code,
}
}