[IronPython] Getting exception line number?

Dino Viehland dinov at microsoft.com
Mon Sep 29 21:59:03 CEST 2008


You can Microsoft.Scripting.Runtime.ExceptionHelpers.GetStackFrames on the Exception object and you'll get back an enumerable of DynamicStackFrame's.  That will give you function names, filenames, and line numbers.

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Serge
Sent: Monday, September 29, 2008 11:37 AM
To: users at lists.ironpython.com
Subject: [IronPython] Getting exception line number?

Hi all, I've been unable to figure out how to get the python line number/source span associated with an exception being thrown from IP2. The IronPython.Runtime.Exceptions don't seem to have an attibute to describe this.

Can someone enlighten me please?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20080929/796138f7/attachment.html>


More information about the Ironpython-users mailing list