Package errors:

- implement GOROOT/src/errors Is interface
- fix bug with GOROOT/src/errors UnWrap / Is
This commit is contained in:
Nicolas JUHEL
2025-02-28 17:37:31 +01:00
parent 0c1f4675fb
commit 1528588499
2 changed files with 16 additions and 12 deletions

View File

@@ -49,6 +49,9 @@ type Error interface {
//GetParentCode return a slice of CodeError value of all parent Error and the code of the current Error
GetParentCode() []CodeError
//Is implement compatiblity with GOROOT/src/errors/wrap Is fucntion
Is(e error) bool
//IsError check if the given error params is a valid error and not a nil pointer
IsError(e error) bool
//HasError check if the given error in params is still in parent error