/// <summary> /// Handles the exception. /// </summary> /// <param name="eventArgs">The <see cref="Xtensive.Orm.Reprocessing.ExecuteErrorEventArgs"/> instance containing the exception data.</param> /// <returns> /// True if needs to reprocess the task, otherwise false. /// </returns> protected override bool HandleException(ExecuteErrorEventArgs eventArgs) { if (eventArgs.Exception is ReprocessableException) { return(OnError(eventArgs)); } return(base.HandleException(eventArgs)); }
private void OnExecuteError(object sender, ExecuteErrorEventArgs e) { _paused = false; if (SynchronizeError != null) { SynchronizeError(this, new SynchronizeErrorEventArgs(e.ExceptionObject)); } }
private static void OleDbHelper_ExecuteError(object sender, ExecuteErrorEventArgs e) { // AppendLog(e.Sql + "\r\n" + e.Exception.Message + e.Exception.StackTrace); }
private static void OleDbHelper_ExecuteError(object sender, ExecuteErrorEventArgs e) { try { CommControl.Tools.WriteLog.AppendErrorLog(e.Sql + "\r\n" + e.Exception.Message + e.Exception.StackTrace); OleDbHelper ole = (OleDbHelper)sender; if (ole.ConnState == System.Data.ConnectionState.Closed && frmConnect==null) { frmConnect = new Start.frmConnect(); frmConnect.ShowDialog(); frmConnect = null; //CommControl.MessageBoxEx.MessageBoxEx.Show("执行数据库操作错误,请重试!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); } } catch { } }
protected override bool OnError(ExecuteErrorEventArgs context) { return(context.Attempt < 2); }
private void OnExecuteError(object sender, ExecuteErrorEventArgs e) { NotifySyncError(e.ErrorMessage); }
protected override bool OnError(ExecuteErrorEventArgs context) => context.Attempt < 2;