/// <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));
 }
Esempio n. 2
0
        private void OnExecuteError(object sender, ExecuteErrorEventArgs e)
        {
            _paused = false;

            if (SynchronizeError != null)
            {
                SynchronizeError(this, new SynchronizeErrorEventArgs(e.ExceptionObject));
            }
        }
Esempio n. 3
0
 private static void OleDbHelper_ExecuteError(object sender, ExecuteErrorEventArgs e)
 {
   //  AppendLog(e.Sql + "\r\n" + e.Exception.Message + e.Exception.StackTrace);
 }
Esempio n. 4
0
        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
            {

            }
        }
Esempio n. 5
0
 protected override bool OnError(ExecuteErrorEventArgs context)
 {
     return(context.Attempt < 2);
 }
Esempio n. 6
0
 private void OnExecuteError(object sender, ExecuteErrorEventArgs e)
 {
     NotifySyncError(e.ErrorMessage);
 }
Esempio n. 7
0
 protected override bool OnError(ExecuteErrorEventArgs context) => context.Attempt < 2;