blob: 4018220711517fb82476df1f5d83cbe9d2a81da4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
'use strict';
const common = require('../common');
const assert = require('assert');
process.setUncaughtExceptionCaptureCallback(common.mustNotCall());
assert.throws(
() => require('domain'),
{
code: 'ERR_DOMAIN_CALLBACK_NOT_AVAILABLE',
name: 'Error',
message: /^A callback was registered.*with using the `domain` module/
}
);
process.setUncaughtExceptionCaptureCallback(null);
require('domain'); // Should not throw.
|