Ejemplo n.º 1
0
 public void OnSkippedChange(object sender, SkippedChangeEventArgs args)
 {
     Logger.Log("SKIP operation {0} on file {1} with error {2}", LogInfo.Info, VerbosityInfoLevel.V2,
                args.ChangeType.ToString().ToUpper(),
                (!string.IsNullOrEmpty(args.CurrentFilePath) ? args.CurrentFilePath : args.NewFilePath),
                (args.Exception == null) ? "no error msg" : args.Exception.Message);
 }
Ejemplo n.º 2
0
 protected virtual void OnSkippedChange(object sender, SkippedChangeEventArgs ev)
 {
     if (SkippedChange != null)
     {
         SkippedChange(sender, ev);
     }
 }
Ejemplo n.º 3
0
 private void OnSkippedChange(object sender, SkippedChangeEventArgs args)
 {
     this.LogTaskMessage(string.Format(CultureInfo.CurrentCulture, "SKIPPED {0} for {1}", args.ChangeType.ToString().ToUpper(CultureInfo.CurrentUICulture), !string.IsNullOrEmpty(args.CurrentFilePath) ? args.CurrentFilePath : args.NewFilePath));
     if (args.Exception != null)
     {
         this.Log.LogErrorFromException(args.Exception, this.LogExceptionStack, true, null);
     }
 }
Ejemplo n.º 4
0
        private static void OnSkippedChange(object sender, SkippedChangeEventArgs args)
        {
            Console.WriteLine("Skipped applying {0} for {1} due to error", args.ChangeType.ToString().ToUpper(), (!string.IsNullOrEmpty(args.CurrentFilePath) ? args.CurrentFilePath : args.NewFilePath));

            if (args.Exception != null)
            {
                Console.WriteLine("--> {0}", args.Exception.Message);
            }
        }
Ejemplo n.º 5
0
 private void OnFileSystemSkippedChange(object sender, SkippedChangeEventArgs ev)
 {
     FotoShoutUtils.Log.LogManager.Error(_logger, string.Format("Skipped {0} for the \"{1}\" due to error.",
                                                                ev.ChangeType.ToString().ToUpper(), (!string.IsNullOrEmpty(ev.CurrentFilePath)) ? ev.CurrentFilePath : ev.NewFilePath));
     if (ev.Exception != null)
     {
         FotoShoutUtils.Log.LogManager.Error(_logger, ev.Exception.ToString());
     }
 }
Ejemplo n.º 6
0
    public static void OnSkippedChange(object sender, SkippedChangeEventArgs args)
    {
        Console.WriteLine("-- Skipped applying " + args.ChangeType.ToString().ToUpper()
              + " for " + (!string.IsNullOrEmpty(args.CurrentFilePath) ?
                            args.CurrentFilePath : args.NewFilePath) + " due to error");

        if (args.Exception != null)
            Console.WriteLine("   [" + args.Exception.Message + "]");
    }
Ejemplo n.º 7
0
        public void OnSkippedChange(object sender, SkippedChangeEventArgs args)
        {
            ErrorFormat("Skipped applying {0} for {1} due to error.", args.ChangeType.ToString().ToUpper(),
                        (!string.IsNullOrEmpty(args.CurrentFilePath) ? args.CurrentFilePath : args.NewFilePath));

            if (args.Exception != null)
            {
                ErrorFormat("Error: {0}", args.Exception.Message);
            }
        }
Ejemplo n.º 8
0
        public static void OnSkippedChange(object sender, SkippedChangeEventArgs args)
        {
            SharpToolsMVVMMediator.NotifyColleagues("update", "Error! Skipped file: " + args.ChangeType.ToString().ToUpper() + " for "
                                                    + (!string.IsNullOrEmpty(args.CurrentFilePath) ? args.CurrentFilePath : args.NewFilePath));

            if (args.Exception != null)
            {
                SharpToolsMVVMMediator.NotifyColleagues("update", "Error: " + args.Exception.Message);
            }
        }
Ejemplo n.º 9
0
        public static void OnSkippedChange(object sender, SkippedChangeEventArgs args)
        {
            Logging.Log("-- Skipped applying " + args.ChangeType.ToString().ToUpper()
                        + " for " + (!string.IsNullOrEmpty(args.CurrentFilePath) ?
                                     args.CurrentFilePath : args.NewFilePath) + " due to error");

            if (args.Exception != null)
            {
                Logging.Log("   [" + args.Exception.Message + "]");
            }
        }
        //Creates string message about error information for any changes that were skipped
        //Sends event
        public void FolderSynchronizator_OnSkippedChangeEventHandler(object sender, SkippedChangeEventArgs args)
        {
            string message = String.Format("-- Skipped applying " + args.ChangeType.ToString().ToUpper()
                                           + " for " + (!string.IsNullOrEmpty(args.CurrentFilePath) ? args.CurrentFilePath : args.NewFilePath) + " due to error");

            if (args.Exception != null)
            {
                message = String.Format(message + "   [" + args.Exception.Message + "]");
            }

            if (SkippedChangeEventEventHandler != null)
            {
                SkippedChangeEventEventHandler(this, new WindowsFormsApplication1.SynchronizationController.SynchronizationEventArgs(message, DateTime.Now));
            }
        }
Ejemplo n.º 11
0
        void OnDestinationSkippedChange(object sender, SkippedChangeEventArgs e)
        {
            if (e.SkipReason == SkipReason.ApplicationRequest)
            {
                _progress.WriteMessage("Skipping '{0}  {1}'", e.NewFilePath ?? "", e.CurrentFilePath ?? "");
                return;
            }

            if (e.Exception.Message.Contains("space") ||
                e.Exception.Message.Contains("full") ||
                e.Exception.GetType() == typeof(System.IO.IOException))
            {
                _progress.WriteError(e.SkipReason.ToString());
                _progress.WriteError(e.Exception.Message);
                _gotIOExceptionProbablyDiskFull = true;
                _agent.Cancel();                //will just end this group, not close the window
                return;
            }
            //ConflictLoserWriteError. This reason will be raised if a change is skipped because an attempt to recycle a losing file fails.
//			var path = e.CurrentFilePath == null ? e.NewFilePath : e.CurrentFilePath;
            try
            {
                _progress.WriteError("File Skipped ['{0}'/'{1}']. Reason={2}. Exception Follows:", e.NewFilePath ?? "", e.CurrentFilePath ?? "", e.SkipReason);
                if (e.Exception != null)
                {
                    _progress.WriteException(e.Exception);
                }

                _errorCountSinceLastSuccess++;
                if (_errorCountSinceLastSuccess > MaxErrorsBeforeAbort)
                {
                    _progress.WriteError("Error count exceeded limit. Will abort.");
                    _cancelRequested = true;
                    _agent.Cancel();
                }
            }
            catch (Exception error)
            {
                try
                {
                    _progress.WriteException(error);
                }
                catch (Exception progressException)
                {
                    Palaso.Reporting.ErrorReport.ReportFatalException(progressException);
                }
            }
        }
Ejemplo n.º 12
0
        static void destProvider_SkippedChange(object sender, SkippedChangeEventArgs e)
        {
            Console.WriteLine("-- Skipped applying " + e.ChangeType.ToString().ToUpper()
                 + " for " + (!string.IsNullOrEmpty(e.CurrentFilePath) ?
                               e.CurrentFilePath : e.NewFilePath) + " due to error");

            if (e.Exception != null)
                Console.WriteLine("   [" + e.Exception.Message + "]"); 
        }
Ejemplo n.º 13
0
 private static void OnSkippedChange(object sender, SkippedChangeEventArgs e)
 {
     Console.WriteLine("-> aplicação de {0} para {1} deu erro", e.ChangeType, !String.IsNullOrEmpty(e.CurrentFilePath) ? e.CurrentFilePath : e.NewFilePath);
 }
Ejemplo n.º 14
0
        // Provide error information for any changes that were skipped.
        private void OnSkippedChange(object sender, SkippedChangeEventArgs args)
        {
            //Console.WriteLine("-- Skipped applying " + args.ChangeType.ToString().ToUpper()
            //      + " for " + (!string.IsNullOrEmpty(args.CurrentFilePath) ?
            //                    args.CurrentFilePath : args.NewFilePath) + " due to error");

            var message = string.Format("-- Skipped applying {0} for {1} due to error",
                args.ChangeType.ToString().ToUpper(),
                (!string.IsNullOrEmpty(args.CurrentFilePath) ? args.CurrentFilePath : args.NewFilePath));
            if (logger != null)
            {
                logger.Info(message);
            }

            if (args.Exception != null)
            {
                //Console.WriteLine("   [" + args.Exception.Message + "]");
                if (logger != null)
                {
                    logger.Info("   [" + args.Exception.Message + "]");
                }
            }
        }
Ejemplo n.º 15
0
        public static void OnSkippedChange(object sender, SkippedChangeEventArgs args)
        {
            if (args.Exception != null)
            {
                //fastest string comparison
                string[] ss = args.Exception.Message.Split(' ');
                string[] sf = "0x80070005".Split(' ');
                //application can't delete file on server. location of this file unknow. rm-09/2015
                int[] c = new int[sf.Length];

                foreach (string str in ss)
                {
                    for (int y = 0; y < sf.Length; y++)
                    {
                        c[y] += ((str.Length - str.Replace(sf[y], String.Empty).Length)/sf[y].Length > 0 ? 1 : 0);
                    }
                }

                if (c[0] > 0)
                {
                    return;
                }

                Console.WriteLine("-- Skipped applying " + args.ChangeType.ToString().ToUpper()
                                  + " for " + (!string.IsNullOrEmpty(args.CurrentFilePath)
                                      ? args.CurrentFilePath
                                      : args.NewFilePath) + " due to error");
                Console.WriteLine("   [" + args.Exception.Message + "]");
            }
        }
Ejemplo n.º 16
0
 private void OnSkippedChange(object sender, SkippedChangeEventArgs args)
 {
     this.LogTaskMessage(string.Format(CultureInfo.CurrentCulture, "SKIPPED {0} for {1}", args.ChangeType.ToString().ToUpper(CultureInfo.CurrentUICulture), !string.IsNullOrEmpty(args.CurrentFilePath) ? args.CurrentFilePath : args.NewFilePath));
     if (args.Exception != null)
     {
         this.Log.LogErrorFromException(args.Exception, this.LogExceptionStack, true, null);
     }
 }
Ejemplo n.º 17
0
        public static void OnSkippedChange(object sender, SkippedChangeEventArgs args)
        {
            Mediator.NotifyColleagues("update", "Error! Skipped file: " + args.ChangeType.ToString().ToUpper() + " for "
                + (!string.IsNullOrEmpty(args.CurrentFilePath) ? args.CurrentFilePath : args.NewFilePath));

            if (args.Exception != null)
                Mediator.NotifyColleagues("update", "Error: " + args.Exception.Message);
        }
Ejemplo n.º 18
0
 private void OnSkippedChange(object sender, SkippedChangeEventArgs e)
 {
     var message = string.Format("Skiping File: {0}, Reason: {1}", e.CurrentFilePath, e.SkipReason);
     notifier.NotifyInfo(message);
 }
Ejemplo n.º 19
0
        private void OnSkippedChange(object sender, SkippedChangeEventArgs args)
        {
            //throw new NotImplementedException();
            Console.WriteLine("-- Skipped applying " + args.ChangeType.ToString().ToUpper()
                  + " for " + (!string.IsNullOrEmpty(args.CurrentFilePath) ?
                                args.CurrentFilePath : args.NewFilePath) + " due to error");

            if (args.Exception != null)
                Console.WriteLine("   [" + args.Exception.Message + "]");

            _logManager.CreateErrorLog(Exception, 12, "dev.test", 5);
        }
Ejemplo n.º 20
0
 void destinationProvider_SkippedChange(object sender, SkippedChangeEventArgs e)
 {
     if (SkippedChange != null)
         SkippedChange(sender, new MySkippedChangeEventArgs()
                                   {
                                       ChangeType = e.ChangeType
                                   });
 }