![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | dist/ | 2 years ago | - | |
![]() | CHANGELOG.md | 40 years ago | 1.1K | |
![]() | LICENSE | 40 years ago | 1.1K | |
![]() | README.md | 40 years ago | 2.8K | d768d73 docs [كارل مبارك] |
![]() | error-stack-parser.d.ts | 40 years ago | 1.6K | |
![]() | error-stack-parser.js | 40 years ago | 8.5K | |
![]() | package.json | 2 years ago | 3.0K | 3e510ca test new git [كارل مبارك] |
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, Error
s
are given a stack
once they're throw
n.
ErrorStackParser.parse(new Error('BOOM'));
=> [
StackFrame({functionName: 'foo', args: [], fileName: 'path/to/file.js', lineNumber: 35, columnNumber: 79, isNative: false, isEval: false}),
StackFrame({functionName: 'Bar', fileName: 'https://cdn.somewherefast.com/utils.min.js', lineNumber: 1, columnNumber: 832, isNative: false, isEval: false, isConstructor: true}),
StackFrame(... and so on ...)
]
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
Want to be listed as a Contributor? Start with the Contributing Guide!