feat: expose ssrRewriteStacktrace#7091
Merged
patak-cat merged 1 commit intovitejs:mainfrom Mar 11, 2022
Merged
Conversation
Member
|
@benmccann just to confirm, is this still needed after merging #7048? |
Collaborator
Author
|
Yes, neither change obviates the desire for the other. I wasn't aware that there was a second issue that Rich had run into until now or I might have either put them in a single PR or better described the relationship between them. |
Member
|
For reference of why this is needed even with #7048, in SvelteKit there may be places where the stacktrace may be fixed twice too (outside of Vite), so having a non-mutable function to fix the stack trace helps avoid the hack mentioned in the issue. |
bluwy
previously approved these changes
Feb 26, 2022
05b97af to
941f139
Compare
patak-cat
approved these changes
Mar 11, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #7045
Additional context
We'd like to get the corrected stacktrace without mutating the original error because we handle certain errors in multiple locations. We can currently workaround this by storing and then resetting the original stack trace, but this would be a much cleaner solution
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123).