This commit is contained in:
@@ -4,4 +4,11 @@ namespace MRCC.Launcher;
|
||||
|
||||
public partial class App : Application
|
||||
{
|
||||
protected override void OnStartup(StartupEventArgs e)
|
||||
{
|
||||
base.OnStartup(e);
|
||||
DispatcherUnhandledException += (s, a) => Program.Log($"UI异常: {a.Exception}");
|
||||
AppDomain.CurrentDomain.UnhandledException += (s, a) => Program.Log($"未处理异常: {a.ExceptionObject}");
|
||||
TaskScheduler.UnobservedTaskException += (s, a) => Program.Log($"任务异常: {a.Exception}");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user