1
0
Fork 0
arangodb/js/node/node_modules/error-stack-parser
Alan Plum 501f5a3f51 Removed unused modules. 2015-04-10 00:33:47 +02:00
..
dist Don't re-invent the wheel. 2015-02-03 11:56:37 +01:00
node_modules/stackframe Removed unused modules. 2015-04-10 00:33:47 +02:00
CHANGELOG.md Updated deps. 2015-03-24 21:51:05 +01:00
LICENSE Don't re-invent the wheel. 2015-02-03 11:56:37 +01:00
README.md Don't re-invent the wheel. 2015-02-03 11:56:37 +01:00
error-stack-parser.js Updated deps. 2015-03-24 21:51:05 +01:00
package.json Removed unused modules. 2015-04-10 00:33:47 +02:00

README.md

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

Build Status Coverage Status Code Climate

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.

Usage

ErrorStackParser.parse(new Error('boom'));

=> [
        StackFrame('funky1', [], 'path/to/file.js', 35, 79), 
        StackFrame('filter', undefined, 'https://cdn.somewherefast.com/utils.min.js', 1, 832),
        StackFrame(... and so on ...)
   ]

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

Browser Support

  • Chrome 1+
  • Firefox 3.6+
  • Safari 7+
  • Opera 9+
  • IE 10+
  • iOS 7+
  • Android 4.2+

Contributing

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

License

This project is licensed to the Public Domain