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

Propagate original error in RuntimeError.cause (#1) #324

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

innermatrix
Copy link

@innermatrix innermatrix commented Dec 1, 2021

Currently, if a variable's value function throws a custom subclass of Error, that custom subclass is lost when the error is converted to RuntimeError, and is subsequently unavailable in the inspector. This PR puts the original error in RuntimeError.cause, thereby making it available to custom inspectors. Behavior of the default inspector is unchanged.

src/errors.js Outdated Show resolved Hide resolved
Co-authored-by: Mike Bostock <mbostock@gmail.com>
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.

2 participants