Closed Lysander83 closed 7 years ago
I haven't been able to reproduce. Some more details would be helpful. I tried running the following and it worked fine:
var test = @"
import traceback
def test():
raise Exception
try:
test()
except Exception as e:
print traceback.format_exc()
";
engine.CreateScriptSourceFromString(test).Execute();
I do not what to say. I will try to make a simple app to reproduce it next week. Our IronPython engine uses py files. Maybe it is important. The traceback and other modules were imported from IP 2.7.7 in both cases the working and not working so the problem must be in IronPython.dll or other dll.
The working version generates the following output:
Traceback (most recent call last):
File "C:\temp...\SDTPanel.py", line 158, in _runPanelItemScript
result=self._panelItemScriptMethod()
File "
The not working version generates the first 2 lines plus 4 pieces of space character. Traceback (most recent call last): File "C:\temp...\SDTPanel.py", line 158, in _runPanelItemScript
Sorry, I have never used github before. It is still open for me.
This issue was moved to IronLanguages/ironpython2#35
We have a .net 4 program that hosts IronPython engine. if an exception is raised while running the script then we cannot get the stack trace information by traceback.format_exc() It worked with IronPython 2.7.5 We cannot reproduce it by running IronPython 2.7 ipy.exe