| | |
| | | public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) |
| | | { |
| | | #region 异常捕获 2023-07-27 17:37:04 |
| | | AppDomain.CurrentDomain.UnhandledException += (sender, e) => { |
| | | if(e.ExceptionObject is Exception exception) |
| | | { |
| | | MainPage.Log("error", "未处理的异常:" + exception.Message + "StackTrace: " + exception.StackTrace); |
| | | } |
| | | }; |
| | | //AppDomain.CurrentDomain.UnhandledException += (sender, e) => { |
| | | // if(e.ExceptionObject is Exception exception) |
| | | // { |
| | | // MainPage.Log("error", "未处理的异常:" + exception.Message + "StackTrace: " + exception.StackTrace); |
| | | // } |
| | | //}; |
| | | |
| | | TaskScheduler.UnobservedTaskException += (sender, e) => { |
| | | if (e.Exception is Exception exception) |
| | | { |
| | | MainPage.Log("error", "未处理的异常:" + exception.Message + "StackTrace: " + exception.StackTrace); |
| | | } |
| | | }; |
| | | //TaskScheduler.UnobservedTaskException += (sender, e) => { |
| | | // if (e.Exception is Exception exception) |
| | | // { |
| | | // MainPage.Log("error", "未处理的异常:" + exception.Message + "StackTrace: " + exception.StackTrace); |
| | | // } |
| | | //}; |
| | | #endregion |
| | | |
| | | |