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

Function test5

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

Source from the content-addressed store, hash-verified

97});
98
99function test5() {
100 // This test creates two nested domains: d7 and d8. d8 _does_ register an
101 // error handler, so throwing within that domain should not emit an uncaught
102 // exception.
103 const d7 = domain.create();
104 const d8 = domain.create();
105
106 d8.on('error', function onErrorInD3Domain() {
107 process.send('errorHandledByDomain');
108 });
109
110 d7.run(function() {
111 d8.run(function() {
112 throw new Error('boom!');
113 });
114 });
115}
116tests.push({
117 fn: test5,
118 expectedMessages: ['errorHandledByDomain']

Callers

nothing calls this directly

Calls 4

sendMethod · 0.65
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…