更新时间:2023-08-23 14:39:28
我可能没有理解这个问题,因为我的理解,这似乎是一个很简单的问题。在 Exception
类中有一个 StackTrace
属性。您可以从该属性获取堆栈跟踪:
I might not have understood this question because to my understanding, it seems to be quite a simple question. There is a StackTrace
property on the Exception
class. You can get the stack trace from that property:
private void OnDispatcherUnhandledException(object sender,
System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
{
string stackTrace = e.Exception.StackTrace;
}
您可以从 异常
class 页面。如果我误解了你的问题,请让我知道。
You can find out more from the Exception
class page on MSDN. Please let me know if I have misunderstood your problem.