parsing mozilla's Error stack property (FF4+)

Discussion in 'Javascript' started by JavaScriptDude, Jul 1, 2011.

  1. 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
     
    JavaScriptDude, Jul 1, 2011
    #1
    1. Advertising

  2. 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
     
    JavaScriptDude, Jul 21, 2011
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Henri
    Replies:
    9
    Views:
    1,846
    Toby Inkster
    Feb 22, 2005
  2. Surinder Singh
    Replies:
    1
    Views:
    1,206
    Richard Bos
    Dec 20, 2007
  3. Jeff Thies

    FF4

    Jeff Thies, Mar 27, 2011, in forum: HTML
    Replies:
    2
    Views:
    426
    Jeff Thies
    Mar 28, 2011
  4. Java script Dude

    parsing mozilla's Error stack property

    Java script Dude, Jan 5, 2006, in forum: Javascript
    Replies:
    3
    Views:
    179
    Java script Dude
    Jan 6, 2006
  5. Geoff Cox

    stack overflow with IE not with Mozilla?

    Geoff Cox, Mar 26, 2007, in forum: Javascript
    Replies:
    12
    Views:
    173
Loading...

Share This Page