Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consider using pkg/errors instead juju/errors #2622

Closed
siddontang opened this issue Feb 10, 2017 · 1 comment
Closed

consider using pkg/errors instead juju/errors #2622

siddontang opened this issue Feb 10, 2017 · 1 comment
Labels

Comments

@siddontang
Copy link
Member

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.

Refer https://github.com/pkg/errors

@zhexuany
Copy link
Contributor

@siddontang Any updates about this proposal?

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants