loader revisited
This commit is contained in:
@@ -192,6 +192,11 @@ func (ge GenericError) Error() string {
|
||||
return msg
|
||||
}
|
||||
|
||||
// Unwrap returns the underlying error wrapped by GenericError, if any.
|
||||
func (ge GenericError) Unwrap() error {
|
||||
return ge.err
|
||||
}
|
||||
|
||||
func newGenericError(code int, arg ...any) error {
|
||||
e := &GenericError{Code: code}
|
||||
if len(arg) > 0 {
|
||||
@@ -207,7 +212,7 @@ func newGenericError(code int, arg ...any) error {
|
||||
e.subject = asString(arg[i])
|
||||
}
|
||||
}
|
||||
return *e
|
||||
return e
|
||||
}
|
||||
|
||||
func asString(v any) string {
|
||||
|
||||
Reference in New Issue
Block a user