Skip to content

REPL error context logged for all REPL errors; vanilla node logs only for SyntaxErrors #1576

Open
@cspotcode

Description

Vanilla node REPL logs line context only for SyntaxErrors. For example:

$ node
Welcome to Node.js v17.0.0.
Type ".help" for more information.
> foo bar
foo bar           <-- this is the "context" I'm talking about
    ^^^

Uncaught SyntaxError: Unexpected identifier
> 

We log for all errors.

Should we re-align with node in this regard?
Would likely require a change to cspotcode/node-source-map-support.

This PR highlights the relevant code in node core: nodejs/node#29676

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions