Skip to content

jrf0110/error-stack-parser

Repository files navigation

error-stack-parser.js - Extract meaning from JS Errors

Build StatusCoverage StatusGitHub license

Simple, cross-browser Error parser. This library parses and extracts function names, URLs, line numbers, and column numbers from the given Error's stack as an Array of StackFrames.

Once you have parsed out StackFrames, you can do much more interesting things. See stacktrace-gps.

Note that in IE9 and earlier, Error objects don't have enough information to extract much of anything. In IE 10, Errors are given a stack once they're thrown.

Browser Support

Sauce Test Status

Usage

ErrorStackParser.parse(newError('boom'));=>[StackFrame('funky1',[],'path/to/file.js',35,79),StackFrame('filter',undefined,'https://cdn.somewherefast.com/utils.min.js',1,832),StackFrame(... andsoon...)]

Installation

npm install error-stack-parser bower install error-stack-parser https://raw.githubusercontent.com/stacktracejs/error-stack-parser/master/dist/error-stack-parser.min.js

Contributing

Want to be listed as a Contributor? Start with the Contributing Guide!

About

Extract meaning from JS Errors

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript100.0%