-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
domain: allow concurrent user-land impl
Currently, only one domain-lke implementation (the core domain one) can be used to handle uncaught exceptions or unhandled error events. This PR aims at making it possible for different domain-like user-land implementations to be used concurrently (including with the core domain impl) so that the state of the core domain module (doc deprecated) does not prevent users of domains from having a well-maintained domain-like facility. Ref: #23348 Co-authored-by: Rich Trott <rtrott@gmail.com>
- Loading branch information
Showing
7 changed files
with
90 additions
and
120 deletions.
There are no files selected for viewing
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
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
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
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
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
11 changes: 0 additions & 11 deletions
11
test/parallel/test-domain-load-after-set-uncaught-exception-capture.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,6 @@ | ||
'use strict'; | ||
const common = require('../common'); | ||
const assert = require('assert'); | ||
|
||
process.setUncaughtExceptionCaptureCallback(common.mustNotCall()); | ||
|
||
assert.throws( | ||
() => require('domain'), | ||
{ | ||
code: 'ERR_DOMAIN_CALLBACK_NOT_AVAILABLE', | ||
name: 'Error', | ||
message: /^A callback was registered.*with using the `domain` module/ | ||
} | ||
); | ||
|
||
process.setUncaughtExceptionCaptureCallback(null); | ||
require('domain'); // Should not throw. |
28 changes: 0 additions & 28 deletions
28
test/parallel/test-domain-set-uncaught-exception-capture-after-load.js
This file was deleted.
Oops, something went wrong.