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

Add backtraces to errors #3726

Open
4 tasks
jedel1043 opened this issue Mar 8, 2024 · 2 comments
Open
4 tasks

Add backtraces to errors #3726

jedel1043 opened this issue Mar 8, 2024 · 2 comments
Labels
API enhancement New feature or request vm Issues and PRs related to the Boa Virtual Machine.
Milestone

Comments

@jedel1043
Copy link
Member

As part of our focus on improving our Error APIs, we need to introduce backtraces to errors generated at execution. This includes:

  • Adding a Backtrace struct.
  • Retrofitting our VM to hold the current backtrace.
  • Adding names to all native functions.
  • Storing the current backtrace inside every thrown JsError.
@jedel1043 jedel1043 added enhancement New feature or request API vm Issues and PRs related to the Boa Virtual Machine. labels Mar 8, 2024
@jedel1043 jedel1043 added this to the v0.18.1 milestone Mar 8, 2024
@raskad
Copy link
Member

raskad commented Mar 8, 2024

Do you think it makes sense to consider TCO when we implement this? We could make sure both work together or decide that we do not want to implement TCO.

See the discussion in #3510.

@jedel1043
Copy link
Member Author

jedel1043 commented Mar 8, 2024

Yep. Though, I think a well designed backtrace API would isolate both issues e.g. errors would get a stacktrace without knowing the internals of whether the VM has a "shadow trace" or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API enhancement New feature or request vm Issues and PRs related to the Boa Virtual Machine.
Projects
None yet
Development

No branches or pull requests

2 participants