我在 C# 中嵌入 IronPython 2.0。在 IronPython 中,我定义了自己的异常:
def foobarException(Exception):
pass
并在某处提出:
raise foobarException( "This is the Exception Message" )
现在在 C# 中,我有:
try
{
callIronPython();
}
catch (Exception e)
{
// How can I determine the name (foobarException) of the Exception
// that is thrown from IronPython?
// With e.Message, I get "This is the Exception Message"
}