You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

19 lines
482 B

'use strict';
const common = require('../common');
var assert = require('assert');
var MESSAGE = 'catch me if you can';
process.on('uncaughtException', common.mustCall(function(e) {
console.log('uncaught exception! 1');
assert.strictEqual(MESSAGE, e.message);
}));
process.on('uncaughtException', common.mustCall(function(e) {
console.log('uncaught exception! 2');
assert.strictEqual(MESSAGE, e.message);
}));
setTimeout(function() {
throw new Error(MESSAGE);
}, 10);