1'use strict'; 2 3const common = require('../common'); 4const domain = require('domain'); 5 6function test() { 7 const d = domain.create(); 8 const d2 = domain.create(); 9 10 d.run(function() { 11 d2.run(function() { 12 throw new Error('boom!'); 13 }); 14 }); 15} 16 17if (process.argv[2] === 'child') { 18 test(); 19} else { 20 common.childShouldThrowAndAbort(); 21} 22