mirror of https://github.com/lukechilds/node.git
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
455 B
19 lines
455 B
9 years ago
|
'use strict';
|
||
|
require('../common');
|
||
|
const vm = require('vm');
|
||
|
|
||
|
console.error('beginning');
|
||
|
|
||
|
// Regression test for https://github.com/nodejs/node/issues/7397:
|
||
|
// vm.runInThisContext() should not print out anything to stderr by itself.
|
||
|
try {
|
||
|
vm.runInThisContext(`throw ({
|
||
|
name: 'MyCustomError',
|
||
|
message: 'This is a custom message'
|
||
|
})`, { filename: 'test.vm' });
|
||
|
} catch (e) {
|
||
|
console.error('received error', e.name);
|
||
|
}
|
||
|
|
||
|
console.error('end');
|