v0.0.541
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 3m3s

This commit is contained in:
2024-11-05 14:38:42 +01:00
parent 207fd331d5
commit 9b2028ab54
4 changed files with 13 additions and 3 deletions

View File

@@ -370,6 +370,14 @@ func (ee *ExErr) GetExtra(key string) (any, bool) {
return nil, false
}
func (ee *ExErr) UniqueIDs() []string {
ids := []string{ee.UniqueID}
for curr := ee; curr != nil; curr = curr.OriginalError {
ids = append(ids, curr.UniqueID)
}
return ids
}
// contains test if the supplied error is contained in this error (anywhere in the chain)
func (ee *ExErr) contains(original *ExErr) (*ExErr, bool) {
if original == nil {