Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Uncatchable Exception when writing malformed octal constants

#14

Hi,

Octal constants in javascript are written with a leading zero. "07" is 7, "08" and "09" are not legal constants and they give the following error in the spidermonkey shell:

typein:1: warning: 09 is not a legal ECMA-262 octal constant:
typein:1: warning: 09
typein:1: warning: ^
As far as python-spidermonkey is concerned, it is translated into a JSError exception, like every other error.
However, this "magical" exception cannot be catched. It will propagate until program termination, which is quite annoying.
Please fix it :-)

thanks
Riccardo

Reported by Riccardo Pelizzi · May 14th, 2009 @ 10:23 AM

State: resolved
Milestone: none
Assigned to: Paul J. Davis Paul J. Davis

Activity

  1. Paul J. Davis
    Paul J. Davis
    • State changed from new to open

    Ricardo,

    I committed a test that shows (at least here) that the generated JSError is in fact catchable. Can you check the tests on your machine? They can be run with:

    $ python setup.py test
    

    Thanks

    May 14th, 2009 @ 11:55 AM

  2. Riccardo Pelizzi
    Riccardo Pelizzi

    My bad, i didn't notice that a new version was out. I pulled the 0.0.5 on the 9th :-)
    It is indeed working on the 0.0.6
    thanks!

    May 14th, 2009 @ 12:10 PM

  3. Paul J. Davis
    Paul J. Davis
    • State changed from open to resolved

    No problem. Keep an eye out for an update whenever Spidermonkey 1.8.1 is released.

    May 14th, 2009 @ 12:13 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.