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