<div>Trying to get the line number of an error.&nbsp; CPython produces:</div>
<div>&nbsp;</div>
<div>Python 2.4.2 (#67, Sep 28 2005, 12:41:11)<br>Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;li<br>&gt;&gt;&gt; def test():<br>...&nbsp;&nbsp;&nbsp;&nbsp; print &quot;hi&quot;<br>...&nbsp;&nbsp;&nbsp;&nbsp; int(&quot;hi&quot;)<br>
...<br>&gt;&gt;&gt; test()<br>hi<br>Traceback (most recent call last):<br>&nbsp; File &quot;&lt;stdin&gt;&quot;, line 1, in ?<br>&nbsp; File &quot;&lt;stdin&gt;&quot;, line 3, in test<br>ValueError: invalid literal for int(): hi</div>

<div>&nbsp;</div>
<div>&nbsp;</div>
<div>But IP RC2&nbsp;produces:</div>
<div>&nbsp;</div>
<div>IronPython 1.0.60816 on .NET 2.0.50727.42<br>Copyright (c) Microsoft Corporation. All rights reserved.<br>&gt;&gt;&gt; def test():<br>...&nbsp;&nbsp;&nbsp;&nbsp; print &quot;hi&quot;<br>...&nbsp;&nbsp;&nbsp;&nbsp; int(&quot;hi&quot;)<br>...<br>&gt;&gt;&gt; test()
<br>hi<br>Traceback (most recent call last):<br>&nbsp; File , line 0, in &lt;stdin&gt;##5<br>&nbsp; File , line 0, in test<br>ValueError: invalid integer number literal</div>
<div>&nbsp;</div>
<div>How do I get the line number of this runtime error?&nbsp; </div>
<div>&nbsp;</div>
<div>MattB</div>