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
Now we use juju errors and use errors.Wrap to wrap the error for later getting error stack. It is not convenient because we have to use errors.Wrap in every error return.
Most of the time, we just want to know the error stack, so it is better to use pkg/errors instead. We can use "%+v" to get the error stack and no need to wrap error when return every time.
I created a PR about error handling several day ago. I believe it is will be better if we finish error handling and then do the improvement. Currently, some math operation does not return error code correctly i.e select pow(10, 700). We need investigate this.
Now we use juju errors and use
errors.Wrap
to wrap the error for later getting error stack. It is not convenient because we have to useerrors.Wrap
in every error return.Most of the time, we just want to know the error stack, so it is better to use pkg/errors instead. We can use "%+v" to get the error stack and no need to wrap error when return every time.
Refer https://github.com/pkg/errors
The text was updated successfully, but these errors were encountered: