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

Include stack in RuntimeError #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wyozi
Copy link
Collaborator

@wyozi wyozi commented Jul 28, 2020

I think including stack in errors is definitely a good thing, but

  • Should it be in other ErrorKinds than RuntimeError? Probably not since it might not really be feasible to even get the stack for those.
  • Should the stack just be blindly appended in fmt?
  • This breaks backward compat due to new struct item, but user code shouldn't even use ErrorKind::RuntimeError
  • It would be amazing if the stack of the caller of Rust code that errors with Error::External would be recorded in a stack somewhere

The whole output of fmt looks like this:

nope: JavaScript runtime error (TypeError): TypeError: nope
    at woah (file:1)
    at eval (file:1) preventsyield

@wyozi wyozi requested a review from SkylerLipthay July 28, 2020 13:04
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.

1 participant