MCPcopy Index your code
hub / github.com/nodejs/node / test6

Function test6

test/parallel/test-domain-uncaught-exception.js:121–140  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

119});
120
121function test6() {
122 // This test creates two nested domains: d9 and d10. d10 _does_ register an
123 // error handler, so throwing within that domain in an async callback should
124 // _not_ emit an uncaught exception.
125 //
126 const d9 = domain.create();
127 const d10 = domain.create();
128
129 d10.on('error', function onErrorInD2Domain() {
130 process.send('errorHandledByDomain');
131 });
132
133 d9.run(function() {
134 d10.run(function() {
135 setTimeout(function onTimeout() {
136 throw new Error('boom!');
137 }, 1);
138 });
139 });
140}
141
142tests.push({
143 fn: test6,

Callers

nothing calls this directly

Calls 5

sendMethod · 0.65
setTimeoutFunction · 0.50
createMethod · 0.45
onMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…