This option has been broken for almost a year when used with any of the vm.runIn.. family of functions, except for syntax errors. Backport-PR-URL: https://github.com/nodejs/node/pull/14373 PR-URL: https://github.com/nodejs/node/pull/13074 Reviewed-By: Anna Henningsen <anna@addaleax.net>
15 lines
318 B
JavaScript
15 lines
318 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const vm = require('vm');
|
|
|
|
console.error('beginning');
|
|
|
|
try {
|
|
vm.runInThisContext('throw new Error("boo!")', { filename: 'test.vm'});
|
|
} catch (err) {
|
|
console.error(err.stack);
|
|
}
|
|
|
|
vm.runInThisContext('throw new Error("spooky!")', { filename: 'test.vm' });
|
|
|
|
console.error('end');
|