mirror of https://github.com/nodejs/node.git
18 lines
288 B
JavaScript
18 lines
288 B
JavaScript
|
'use strict';
|
||
|
|
||
|
const common = require('../common');
|
||
|
const initHooks = require('./init-hooks');
|
||
|
|
||
|
const hooks = initHooks();
|
||
|
hooks.enable();
|
||
|
|
||
|
setImmediate(() => {
|
||
|
throw new Error();
|
||
|
});
|
||
|
|
||
|
setTimeout(() => {
|
||
|
throw new Error();
|
||
|
}, 1);
|
||
|
|
||
|
process.on('uncaughtException', common.mustCall(2));
|