Skip to content

Remove 3rd party function calls from stack trace only when earlier than user code #1766

Closed
gluckgames/pixi-packer
#17

Description

Hey,

Shortening of stack traces is great, but it shouldn't suppress the exception's source from 3rd party (stuff in node_modules) function calls that come after user code. The ones leading up to user code are definitely useless (like two dozens of Mocha internal calls), but hiding the the path from user code to the possibly faulty library makes it a little difficult to discern the problem.

Case in point, I had a problem in a module:

      at normalizeValue (/Users/user/node_modules/whatwg-fetch/fetch.js:20:20)
      at Headers.append (/Users/user/node_modules/whatwg-fetch/fetch.js:45:13)
      at /Users/user/node_modules/whatwg-fetch/fetch.js:38:14
      at Array.forEach (native)
      at new Headers (/Users/user/node_modules/whatwg-fetch/fetch.js:37:43)
      at new Request (/Users/user/node_modules/whatwg-fetch/fetch.js:211:20)
      at self.fetch (/Users/user/node_modules/whatwg-fetch/fetch.js:276:17)
      at /Users/user/fetch.js:9:10
      ...

With short stack traces on, the only lines visible were:

      at Array.forEach (native)
      at /Users/user/fetch.js:9:10

Impossible to decipher. ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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