mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-24 09:48:49 +02:00
fix: nil when printing error in edge cases
This commit is contained in:
@@ -87,6 +87,9 @@ func Join(errors ...error) Error {
|
||||
func JoinLines(main error, errors ...string) Error {
|
||||
errs := make([]error, len(errors))
|
||||
for i, err := range errors {
|
||||
if err == "" {
|
||||
continue
|
||||
}
|
||||
errs[i] = newError(err)
|
||||
}
|
||||
return &nestedError{Err: main, Extras: errs}
|
||||
|
||||
Reference in New Issue
Block a user