v0.0.551 change exerr.RecursiveMessage() logic: use messages of Wrap() if not empty
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 2m9s

This commit is contained in:
2025-01-04 02:33:49 +01:00
parent 36b092774d
commit f7b4aa48d7
4 changed files with 10 additions and 5 deletions

View File

@@ -205,7 +205,7 @@ func (ee *ExErr) ShortLog(evt *zerolog.Event) {
}
// RecursiveMessage returns the message to show
// = first error (top-down) that is not wrapping/foreign/empty
// = first error (top-down) that is not foreign/empty
// = lowest level error (that is not empty)
// = fallback to self.message
func (ee *ExErr) RecursiveMessage() string {
@@ -213,7 +213,7 @@ func (ee *ExErr) RecursiveMessage() string {
// ==== [1] ==== first error (top-down) that is not wrapping/foreign/empty
for curr := ee; curr != nil; curr = curr.OriginalError {
if curr.Message != "" && curr.Category != CatWrap && curr.Category != CatForeign {
if curr.Message != "" && curr.Category != CatForeign {
return curr.Message
}
}