You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah this one is a leakage of some internal rules around errors, an opinionated take on when to wrap errors. We use some linting tools to prevent this but you're right, this shouldn't be a strongly opinionated library in this regard.
Happy to accept a PR for fault and the other sub-packages to resolve this!
I found it counter intuitive that fault.Wrap panicked when I passed a nil error.
I tried to upgrade my code by simply replacing
with
However sometimes the err in my code is nil and fault.Wrap panicked.
For an error handling library it makes sense to me to not introduce panics into code.
I have these changes on my optional location branch (https://github.com/spearson78/fault/tree/floc). I can separate out the changes if needed.
The text was updated successfully, but these errors were encountered: