Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

module: fix column offset on first line stack trace #25342

Closed
wants to merge 1 commit into from

Commits on May 16, 2015

  1. module: fix column offset on first line stack trace

    When modules are loaded by require(), they are wrapped in
    a function. This added text causes errors on the first line
    of a file to be offset by the length of the function
    declaration. For example, an error on the first character
    of a module would appear as if it were on column 63.
    
    To fix this problem I added line and column offset support
    to the ContextifyScript object and added options to the
    runInContext(and friends) function. I then added a column
    offset to module._compile that compensates for the function
    wrapper.
    
    Fixes nodejs#9445
    brendan0powers committed May 16, 2015
    Configuration menu
    Copy the full SHA
    edc7dd3 View commit details
    Browse the repository at this point in the history