Get an array of CallSiteLike objects corresponding to the stack
trace of the Error object provided.
This does not actually look at the current call site, or do anything
magical with the V8 engine. It's just parsing a string.
While some effort is made to interpret stacks correctly when an Error
contains a name and message, remember that the Error.stack property in
JavaScript is remarkably sloppy. In some cases, if the Error.message
contains \n and some lines after the first look like stack trace lines,
incorrect data may result. It's only as good as the stack you pass to it.
Get an array of CallSiteLike objects corresponding to the stack trace of the Error object provided.
This does not actually look at the current call site, or do anything magical with the V8 engine. It's just parsing a string.
While some effort is made to interpret stacks correctly when an Error contains a
name
andmessage
, remember that theError.stack
property in JavaScript is remarkably sloppy. In some cases, if theError.message
contains\n
and some lines after the first look like stack trace lines, incorrect data may result. It's only as good as the stack you pass to it.