currentExecutingScript icon indicating copy to clipboard operation
currentExecutingScript copied to clipboard

Use 3rd party `Error#stack` parser instead of homegrown parser

Open JamesMGreene opened this issue 10 years ago • 3 comments

StackTrace.js has extracted its internal stack parser as "error-stack-parser", with 1 dependency on "stackframe" (a simple internal data model to represent frames in the call stack).

Make both devDependencies, then use amdClean in a locally defined Grunt task to smush them together sans the AMD internals.

JamesMGreene avatar Mar 20 '15 13:03 JamesMGreene

Possible alternative: "stackinfo"

JamesMGreene avatar Dec 27 '15 01:12 JamesMGreene

Additionally, if "error-stack-parser" was used, it could also be combined with "stacktrace-gps"'s StackTraceGPS#pinpoint method to asynchronously resolve minified locations to their source-mapped equivalents.

JamesMGreene avatar Dec 27 '15 14:12 JamesMGreene

Additionally, if "error-stack-parser" was used, it could also be combined with "stacktrace-gps"'s StackTraceGPS#pinpoint method to asynchronously resolve minified locations to their source-mapped equivalents.

Scratch that, resolving to source mapped scripts would actually be rather unhelpful as they may or may not actually be loaded on the client-side and we are trying to retrieve the pertinent loaded script element.

JamesMGreene avatar Dec 28 '15 06:12 JamesMGreene