Python-spidermonkey: How to get a line num. of error
<p>How to retrieve the line number in which a error occured?</p>

<p>In the next script the line outputs (as the result of the last <strong>raise</strong>) but there is no line num. in JSError object.</p>

<pre><code>from spidermonkey import Runtime, JSError

runtime = Runtime()
context = runtime.new_context()

try:
    context.execute( "function test(){ return 'OK' }; \n\ntest2()" )
except JSError as e:
    print "ERROR!"
    print "args = {0}".format( e.args )
    print "message = {0}".format( e.message )
    print "__dict__ = {0}".format( e.__dict__ )
    raise
</code></pre>

<p>The result:</p>

<pre><code>ERROR!
args = ('ReferenceError: test2 is not defined',)
message = ReferenceError: test2 is not defined
__dict__ = {}
Traceback (most recent call last):
  File "test.py", line 7, in &lt;module&gt;
    context.execute( "function test(){ return 'OK' }; \n\ntest2()" )
  File "&lt;anonymous JavaScript&gt;", line 3, in JavaScript code
spidermonkey.JSError: ReferenceError: test2 is not defined
</code></pre>
