コード例 #1
0
        private void CurrentDomain_UnhandledException(Object sender, UnhandledExceptionEventArgs e)
        {
            Exception exc = e.ExceptionObject as Exception;

            ClientLog.WriteLog(exc.Message + Environment.NewLine + exc.StackTrace);
            MessageBox.Show("程序异常", "程序异常", MessageBoxButton.OK, MessageBoxImage.Error);
        }
コード例 #2
0
 private void Current_DispatcherUnhandledException(Object sender, DispatcherUnhandledExceptionEventArgs e)
 {
     ClientLog.WriteLog(e.Exception.Message + Environment.NewLine + e.Exception.StackTrace);
     MessageBox.Show("程序异常", "程序异常", MessageBoxButton.OK, MessageBoxImage.Error);
     e.Handled = true;
 }