GithubHelp home page GithubHelp logo

isabella232 / error-stack-parser Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rollbar/error-stack-parser

0.0 0.0 0.0 5.83 MB

Extract meaning from JS Errors

Home Page: http://www.stacktracejs.com/

License: The Unlicense

Makefile 2.52% JavaScript 97.48%

error-stack-parser's Introduction

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

error-stack-parser's People

Contributors

coryvirok avatar eriwen avatar oliversalzburg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.