Beispiel #1
0
 private static void DataSource_ExceptionOccurred(object sender, ExceptionOccurredEventArgs e)
 {
     if (DataSourceExceptionOccurred != null)
     {
         DataSourceExceptionOccurred(sender, e);
     }
 }
 private void DataEngine_DataSourceExceptionOccurred(object sender, ExceptionOccurredEventArgs e)
 {
     if (e.Exception == null)
     {
         _fLogService.Error("来自底层空的异常...");
         return;
     }
     Action action = new Action(() =>
     {
         switch (e.Exception.Source)
         {
             case "M3_MonitorData":
                 _fLogService.Error("获取数据底层报了异常..." + e.Exception.Message);
                 SetMonitorData(string.Empty);
                 break;
             default:
                 _fLogService.Error(string.Format("其他未处理的异常:{0},{1}", e.Exception.Source, e.Exception.ToString()));
                 break;
         }
     });
     action.BeginInvoke(null, null);
 }