Skip to content

Line parsing breaks with [object Object] #13

@jylauril

Description

@jylauril

For some reason on node side I managed to get following type of stack trace:

Error: Could not do something
  at [object Object].foo.bar (foo.js:1:2)

Which gets parsed into

[{
  fileName: 'Object].foo.bar (foo.js',
  lineNumber: 1,
  functionName: '[object',
  typeName: 'Object',
  methodName: null,
  columnNumber: 2,
  native: false
}]

Problem seems to be with the regexp on this line:
https://github.com/felixge/node-stack-trace/blob/master/lib/stack-trace.js#L42

Might need to do some more advanced regexp magic, or just parse the line differently.. any thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions