IsFatalError returns true if err conforms to the Fatal interface and calling the Fatal method returns true.
(err error)
| 129 | // IsFatalError returns true if err conforms to the Fatal interface |
| 130 | // and calling the Fatal method returns true. |
| 131 | func IsFatalError(err error) (isFatal bool) { |
| 132 | liberrors.Walk(err, func(err error) bool { |
| 133 | if r, ok := err.(Fataler); ok { |
| 134 | isFatal = r.Fatal() |
| 135 | return true |
| 136 | } |
| 137 | return false |
| 138 | }) |
| 139 | return |
| 140 | } |
| 141 | |
| 142 | // NoRetrier is an optional interface for error as to whether the |
| 143 | // operation should not be retried at a high level. |
searching dependent graphs…