15 lines
502 B
C#
15 lines
502 B
C#
using System.Windows;
|
|
|
|
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}");
|
|
}
|
|
}
|