-
-
Notifications
You must be signed in to change notification settings - Fork 501
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
Error stack improvements #3572
Merged
Merged
Error stack improvements #3572
Conversation
This file contains 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
Ryuno-Ki
reviewed
Dec 6, 2024
replace unformatted, escaped string output from util.inspect with debug's own `%O` object pretty-print
…Ref` and handle cases when `.originalError` is undefined, but `cause` exists
noelforte
force-pushed
the
error-stack-improvements
branch
from
December 6, 2024 22:30
50b7f34
to
e6368f8
Compare
zachleat
reviewed
Dec 11, 2024
zachleat
previously approved these changes
Dec 11, 2024
zachleat
approved these changes
Dec 11, 2024
This will ship with v3.0.1-alpha.1 thank you! |
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.
Caught an issue while working to improve errors in
eleventy-plugin-vento
. Looks likeEleventyErrorHandler
'slog
function loop was assigning tonextRef
instead of theoriginalError
key, leading to errors like this:instead of
As a related fix, I also added support for the error handler to unwrap
cause
from the Error object if it's defined, even ifcause.originalError
doesn't exist. This will be helpful for custom languages like Vento, which attach more errors to the stack via theError.cause
convention.Would be great to have this in 3.0.1!
(related: noelforte/eleventy-plugin-vento#69)