Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Extract meaning from JS Errors

License

NotificationsYou must be signed in to change notification settings

stacktracejs/error-stack-parser

Repository files navigation

Build StatusCoverage StatusGitHub licensesize with dependenciesgzip sizemodule formatcode of conductjsDelivr Hits

Simple, cross-browserError parser.This library parses and extracts function names, URLs, line numbers, and column numbers from the given Error'sstack asan Array ofStackFrames.

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

Note that in IE9 and earlier,Error objects don't have enough information to extract much of anything. In IE 10,Errorsare given astack once they'rethrown.

Browser Support

Sauce Test Status

Usage

ErrorStackParser.parse(newError('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(...andsoon...)]

Installation

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

Contributing

Want to be listed as aContributor? Start with theContributing Guide!

Packages

No packages published

Contributors15


[8]ページ先頭

©2009-2025 Movatter.jp