()
| 119 | }); |
| 120 | |
| 121 | function 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 | |
| 142 | tests.push({ |
| 143 | fn: test6, |
nothing calls this directly
no test coverage detected
searching dependent graphs…