[Ironpython-users] Embedded Engine and Tracebacks

Jake Colman jcolman at billtrust.com
Fri Aug 21 18:30:41 CEST 2015


I'm using IronPython 2.75 embedded in a C++/C# application.  If the script
we are executing has a syntax error I want to see a traceback that contains
the line number of the error.  This only seems to work if I specify the
"Debug" engine option.  Is this to be expected?  According to my reading,
the Debug option turns off garbage collection and I wouldn't Debug turned
on for a release build.  Is there a solution for this?

Instead of this:

global name 'foobar' is not defined
IronPython.Runtime.UnboundNameException: global name 'foobar' is not defined

I always want to see this:

global name 'foobar' is not defined
IronPython.Runtime.UnboundNameException: global name 'foobar' is not
defined   at
IronPython.Runtime.Operations.PythonOps.GetVariable(CodeContext context,
String name, Boolean isGlobal, Boolean lightThrow)   at
IronPython.Runtime.Operations.PythonOps.GetGlobal(CodeContext context,
String name)   at <unnamed>$4.InitScript$129(PythonFunction $function) in
C:\vc\scripts\FOOBAR.py:line 2965

Thanks!


*Jake Colman*Director, Software Development
Office: 609.235.1010
Direct: 609.235.0792
Email: jcolman at billtrust.com
www.billtrust.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20150821/2d318719/attachment.html>


More information about the Ironpython-users mailing list