Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module: print nicer error message on syntax error #17281

Merged
merged 1 commit into from
Nov 29, 2017

Commits on Nov 29, 2017

  1. module: print better message on esm syntax error

    Include the offending line in the output and underline the bad token.
    
    Before this commit, it printed "SyntaxError: Unexpected reserved word"
    without indicating where the syntax error is.
    
    Now it prints the line and underlines the offending token, like it does
    for syntax errors in CJS scripts.
    
    Minor changes are made to the test runner in order to support `*.mjs`
    files in test/message.
    
    Fixes: nodejs#17277
    PR-URL: nodejs#17281
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Evan Lucas <evanlucas@me.com>
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    bnoordhuis committed Nov 29, 2017
    Configuration menu
    Copy the full SHA
    597b3d1 View commit details
    Browse the repository at this point in the history