stacktracejs / stacktrace.js

Generate, parse, and enhance JavaScript stack traces in all web browsers

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add defensive code

doubleUTF opened this issue · comments

var stackframes = _filtered(ErrorStackParser.parse(error), opts.filter);

Would it be prudent to add defensive code checking here to make sure ErrorStackParser is not null when this function is being called? In my production, it's possible to invoke fromError when ErrorStackParser is not defined, which causes unhandled JS errors.

Seems like the real issue is that ErrorStackParser is not set, can you submit a test case or snippet that will reproduce this behavior.