• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    setTimeout(function() {
11      throw new Error('boom!');
12    }, 1);
13  });
14}
15
16if (process.argv[2] === 'child') {
17  test();
18} else {
19  common.childShouldThrowAndAbort();
20}
21