• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Flags: --abort-on-uncaught-exception
2'use strict';
3require('../common');
4const vm = require('vm');
5
6// Regression test for https://github.com/nodejs/node/issues/13258
7
8try {
9  new vm.Script({ toString() { throw new Error('foo'); } }, {});
10} catch {}
11
12try {
13  new vm.Script('[', {});
14} catch {}
15