-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix: catch exceptions setting Error.stackTraceLimit #5254
base: main
Are you sure you want to change the base?
Conversation
When node is run with [--frozen-intrinsics], a `TypeError` is thrown when any intrinsic objects or their properties are modified. This occurs when attempting to set `Error.stackTraceLimit`. To avoid exiting due to an uncaught exception, catch the exception, debug log it, and continue. [--frozen-intrinsics]: https://nodejs.org/api/cli.html#--frozen-intrinsics Signed-off-by: Kevin Locke <[email protected]>
The committers listed above are authorized under a signed CLA. |
Note: Tests which load
Since We could smoke test this feature by calling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
This is really more of a bugfix than a feature - so it only necessitates a patch-level version bump. We're also about to release major version 11 and don't have a separate branch set up to differentiate v10 and v11 releases or support backporting. So this should be good to go only after v11 is released this month. |
PR Checklist
status: accepting prs
Overview
When node is run with --frozen-intrinsics, a
TypeError
is thrown when any intrinsic objects or their properties are modified. This occurs when attempting to setError.stackTraceLimit
. To avoid exiting due to an uncaught exception, catch the exception, debug log it, and continue.