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
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 2m9s
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user