如何在IronPython交互窗口中查看.NET内部异常?

2024-09-28 16:58:33 发布

您现在位置:Python中文网/ 问答频道 /正文

IronPython 2.7.5 (2.7.5.0) on .NET 4.0.30319.42000 (32-bit)
>>> from System import Exception
>>> raise Exception("outer", Exception("inner"))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
Exception: outer
>>>

在这样的交互式IronPython窗口中工作时,如何查看内部异常的详细信息?你知道吗

我尝试了-X:ShowClrExceptions-X:PassExceptions,当从命令行运行ipy64.exe时,这些都起作用,但在visualstudio交互窗口中似乎没有效果(尽管我在processhacker中看到它使用这些参数运行ipy64.exe)。你知道吗


Tags: fromimportmostnetonexceptionbitexe