[IronPython] how to convert this code in py 2.0

Dino Viehland dinov at exchange.microsoft.com
Thu Jul 31 17:12:09 CEST 2008

Or RuntimeHelpers.GetDynamicStackFrames to get the line number information for exceptions that occur at runtime.

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dody Gunawinata
Sent: Thursday, July 31, 2008 3:12 AM
To: Discussion of IronPython
Subject: Re: [IronPython] how to convert this code in py 2.0

You can get those information via SyntaxErrorException
On Thu, Jul 31, 2008 at 9:58 AM, Huzaifa <huzi_1982 at hotmail.com<mailto:huzi_1982 at hotmail.com>> wrote:

Ops.ExtractException (ex, _pythonengine.Sys);
       TraceBack tb = _pythonengine.Sys.exc_traceback as TraceBack;
       if (tb != null) {
         ex.Data["LineNumber"] = tb.Line;
         //How to get Column?
         ex.Data["Offset"] = tb.Offset; //doesn't work?

I am not able to convert this code into Ironpython 2
View this message in context: http://www.nabble.com/how-to-convert-this-code-in-py-2.0-tp18748830p18748830.html
Sent from the IronPython mailing list archive at Nabble.com.

Users mailing list
Users at lists.ironpython.com<mailto:Users at lists.ironpython.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20080731/fdc76266/attachment.html>

More information about the Ironpython-users mailing list