blob: f9e685a86ea2e6b0ceaf6a251ff4982547b06b0c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
// Flags: --abort-on-uncaught-exception
'use strict';
const common = require('../common');
const assert = require('assert');
assert.strictEqual(process.hasUncaughtExceptionCaptureCallback(), false);
// This should make the process not crash even though the flag was passed.
process.setUncaughtExceptionCaptureCallback(common.mustCall((err) => {
assert.strictEqual(err.message, 'foo');
}));
throw new Error('foo');
|