-
-
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
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 <kevin@kevinlocke.name>
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. |
Quick status update: Mocha 11 is stable and I'm just waiting this week in case something breaks. I'd be surprised if something does, but you never know! #5249 Assuming nothing goes wrong, I plan on merging this early next week. 🙂 |
Oh, and:
I think there's no harm in Mocha fixing its support now. Eventually the test dependencies will too. No need for us to be the ones still blocking. |
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.