Skip to content

vm: behavior with --abort-on-uncaught-exception #13258

@cjihrig

Description

@cjihrig
  • Version: master
  • Platform: all
  • Subsystem: vm

In the following code, the vm.Script() constructor throws an exception. When node is run normally, the exception is caught and node exits cleanly. However, when run with --abort-on-uncaught-exception, the exception is treated as uncaught.

'use strict';
const vm = require('vm');

try {
  new vm.Script('[', {});
} catch (err) {}

Before attempting to fix this, I wanted to make sure there is agreement that this is a bug. This seems like something that could be handled in ShouldAbortOnUncaughtException().

Related: nodejs/node-report#60

Metadata

Metadata

Assignees

No one assigned

    Labels

    vmIssues and PRs related to the vm subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions