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

Return detailed error (incl. stack trace) instead of err.Error() string #25

Merged
merged 1 commit into from
Mar 23, 2021

Conversation

markusdosch
Copy link
Contributor

In one of our projects, we are using the pkg/errors library. Errors created with this library can contain a stack trace. Unfortunately, when returning such errors from our build functions, extra information like stack traces are currently not being printed out.

With this change, errors created by pkg/errors are printed out in extended format (including stack trace).

"Normal" errors created with errros.New() or fmt.Errorf(...) are not affected, the output for them stays the same.

@coveralls
Copy link

coveralls commented Mar 22, 2021

Coverage Status

Coverage remained the same at 99.677% when pulling 70d6d4f on markusdosch:errors into 9157bf8 on sarulabs:master.

@sarulabs
Copy link
Owner

This seems to be a good change.

But this pattern is also in two other places:

And also here:

Can you add these 3 modifications to your pull request ?

Thank you !

@markusdosch
Copy link
Contributor Author

Hey @sarulabs , thanks for the fast reply & review! 😃 I just updated my PR with the changes you requested.

@sarulabs sarulabs merged commit 7bad26b into sarulabs:master Mar 23, 2021
@sarulabs
Copy link
Owner

I created a new release v2.4.1 with your changes.

Thanks again for you contribution.

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

Successfully merging this pull request may close these issues.

3 participants