Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > parsing mozilla's Error stack property (FF4+)

Reply
Thread Tools

parsing mozilla's Error stack property (FF4+)

 
 
JavaScriptDude
Guest
Posts: n/a
 
      07-01-2011
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/comp...e442efaabfb9cd

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
 
Reply With Quote
 
 
 
 
JavaScriptDude
Guest
Posts: n/a
 
      07-21-2011
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why does std::stack::pop() not throw an exception if the stack is empty? Debajit Adhikary C++ 36 02-10-2011 08:54 PM
C/C++ compilers have one stack for local variables and return addresses and then another stack for array allocations on the stack. Casey Hawthorne C Programming 3 11-01-2009 08:23 PM
stack frame size on linux/solaris of a running application stack Surinder Singh C Programming 1 12-20-2007 01:16 PM
parsing mozilla's Error stack property Java script Dude Javascript 3 01-06-2006 07:12 PM
"stack level too deep"... because Threads keep their "starting" stack Sam Roberts Ruby 1 02-11-2005 04:25 AM



Advertisments