#14 ✓resolved
Riccardo Pelizzi

Uncatchable Exception when writing malformed octal constants

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

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

Comments and changes to this ticket

  • Paul J. Davis

    Paul J. Davis May 14th, 2009 @ 11:55 AM

    • 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

  • Riccardo Pelizzi

    Riccardo Pelizzi May 14th, 2009 @ 12:10 PM

    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!

  • Paul J. Davis

    Paul J. Davis May 14th, 2009 @ 12:13 PM

    • State changed from “open” to “resolved”

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

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Python/JavaScript bridge module, making use of Mozilla's spidermonkey JavaScript implementation. Allows implementation of JavaScript classes, objects and functions in Python, and evaluation and calling of JavaScript scripts and functions respectively. Borrows heavily from Claes Jacobssen's Javascript Perl module, in turn based on Mozilla's 'PerlConnect' Perl binding.

People watching this ticket

Pages