parsing mozilla's Error stack property (FF4+)

J

JavaScriptDude

Well, after 5 years of using Pointy Ears's RegExp hack, I now have to
update my libraries. The original solution is here:
https://groups.google.com/group/com...e=utf-8&q=error.stack+parser#c1e442efaabfb9cd

It appears that this logic now fails as it perpetuates in the for
loop. I don't really want to troubleshoot why the regexp is now doing
this but need a fix so I can support FF 4x+ in my frameworks. I know
that someone probably has this done already.

Does anybody have any latest and greatest ways of parsing Firefox
Error.stack into usable elements: Function name, Line number, Path/
Resource that would support FF 3.6 thru FF 5?

Cheers,
JsD
 
J

JavaScriptDude

The solution to parsing the Mozilla error.stack is to not try and use
the RegEx.exec as a function call like while(MyRegEx.exec(error.stack))
{... as was originally suggested in original thread.

The proper way to do this is to first split error.stack into an array,
loop through the elements then parse via RegEx.exec() one row at a
time.

I have updated my libraries on my side and all is good in the world of
Moz.

- JsD
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top