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

Wrap does not wrap as expected for external errors #32

Open
a-palchikov opened this issue Apr 6, 2017 · 0 comments
Open

Wrap does not wrap as expected for external errors #32

a-palchikov opened this issue Apr 6, 2017 · 0 comments

Comments

@a-palchikov
Copy link
Contributor

Wrap's current behavior is threading the captured instance of TraceErr (or any other implementation of the Error interface) all the way back to the caller.
This is fine if the error originated and is handled on the same call path.

However, when the wrapped error is of external nature (for instance, deserialized from a remote HTTP request), it is replacing the current call stack with a foreign one and the context is lost. In this case, the expected behavior is that both stacks are preserved.

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

No branches or pull requests

1 participant