Exemplo n.º 1
0
        private void OnError(object source, ErrorEventArgs f)
        {
            //VAR
            dt = System.DateTime.UtcNow;
            string filename = "file";
            string ext      = "";
            string LOG_date = "";

            if (MainSettings.Default.L_Filename != string.Empty)
            {
                filename = MainSettings.Default.L_Filename;
            }
            if (MainSettings.Default.L_Extension != string.Empty)
            {
                ext = MainSettings.Default.L_Extension;
            }
            if (MainSettings.Default.L_DataForm != string.Empty)
            {
                LOG_date = dt.ToLocalTime().ToString(MainSettings.Default.L_DataForm);
            }

            try
            {
                SaveErrOutput(f.ToString(), filename, LOG_date, ext);
            }
            catch (Exception g)
            {
                SaveErrOutput(g.ToString(), filename, LOG_date, ext);
            }
        }
Exemplo n.º 2
0
        private void Application_Idle(object sender, EventArgs e)
        {
            if (_dirtyTable)
            {
                _dirtyTable = false;
                doubleBuffer1.Invalidate();
            }

            if (_dirtyErrorEvent != null)
            {
                textBoxWATCHOUTPUT.Text = "ERROR:";
                textBoxWATCHOUTPUT.Text = _dirtyErrorEvent.ToString() + Environment.NewLine;
                _dirtyErrorEvent        = null;
            }
        }
        protected override void OnError(ErrorEventArgs e)
        {
            base.OnError(e);

            /*MessageBox.Show("An error occurred when starting Print Server.\n " +
             *  "Port " + Config.PrintServerPort + " already in used.\n" +
             *  "Please change Printer Port in Configuration Panel and try again"
             *  , "Print Server Cannot Start"
             *  , MessageBoxButtons.OK
             *  , MessageBoxIcon.Error);
             */
            MessageBox.Show(e.ToString(), "Print Server Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

            //ServerController.isPrintServerStarted = false;
        }
Exemplo n.º 4
0
        private void OnError(object sender, ErrorEventArgs e)
        {
            Console.WriteLine("Error");
            Console.WriteLine(e.ToString());

            if (e.Exception.Message.Contains("401") && e.Exception.Message.Contains("HTTP"))
            {
                LoginError?.Invoke();
                Disconnect();
                return;
            }

            if (!clean)
            {
                CreateWebsocket();
            }
        }
Exemplo n.º 5
0
        protected override void OnError(ErrorEventArgs e)
        {
            log_.Error("error: " + e.ToString() + ": " + e.Message);
            if (!closed_)
            {
                try
                {
                    Close();
                }
                catch (System.Exception)
                {
                }
            }
            EventHandler <ErrorEventArgs> handler = OnErrorEvent;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// if the filesystem watcher throws an error - we mostly care about it throwing when
        /// it can't see a network share anymore.  in that case we re-create the file watcher
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void watcher_Error(object sender, ErrorEventArgs e)
        {
            DebugLine("Watcher Error Triggered. " + e.ToString());

            try
            {
                FileSystemWatcher watcher = sender as FileSystemWatcher;

                if (watcher == null)
                {
                    return;
                }

                // if the watcher path no longer exists for whatever reason, add this watcher to the bad queue
                // to re-attempt to see if it exists every 5 seconds.  This can happen if a network drive disconnects
                // or someone removes an attached drive.  re-creating the watcher is required when the device comes
                // back online
                if (!Directory.Exists(watcher.Path))
                {
                    lock (badWatchers)
                    {
                        // add it to the bad watcher list
                        if (watchers.Contains(watcher))
                        {
                            badWatchers.Add(watcher);
                            watchers.Remove(watcher);

                            badWatcherTimer.Start();
                        }
                    }
                }
            }
            catch (Exception err)
            {
                DebugLineError(err, "Error re-setting up watcher");
            }
        }
 /// <summary>
 /// Triggered if FileSystemWatcher runs into an error
 /// </summary>
 /// <param name="sender">The source object</param>
 /// <param name="e">The ErrorEventArgs</param>
 private void FileWatcherError(object sender, ErrorEventArgs e)
 {
     Console.WriteLine(e.ToString());
     FileLogger.Error(e.ToString());
 }
Exemplo n.º 8
0
 void watcher_Error(object sender, ErrorEventArgs e)
 {
     System.Diagnostics.Debug.WriteLine(e.ToString());
 }
Exemplo n.º 9
0
 private void OnError(object sender, ErrorEventArgs e)
 {
     MessageBox.Show(e.ToString());
 }
Exemplo n.º 10
0
 protected override void OnError(ErrorEventArgs e)
 {
     Debug.Log("server error: " + e.ToString());
     Debug.Log("server error: " + e.Message);
 }
Exemplo n.º 11
0
 void FsWatcher_Error(object sender, ErrorEventArgs e)
 {
     Logger.LogError(e.ToString());
     _action();
 }
Exemplo n.º 12
0
 private void ws_BoyOnError(object sender, ErrorEventArgs e)
 {
     Debug.Log("Error : " + e.ToString());
     ErrorCheck(e.ToString());
 }
Exemplo n.º 13
0
 private void ClientSession_Error(object sender, ErrorEventArgs e)
 {
     NoticeAdmin($"检测程序客户端连接错误错误 : {e.ToString()}  \n Exception: {e.Exception?.ToString()}");
 }
Exemplo n.º 14
0
 public void Dialer_Error(object source, ErrorEventArgs e)
 {
     MessageBox.Show(e.ToString());
 }
Exemplo n.º 15
0
 void SqlTableDependency_OnError(object sender, ErrorEventArgs e)
 {
     Clients.All.onError(e.ToString());
     throw e.Error;
 }
Exemplo n.º 16
0
 private static void ErrorCallback(object sender, ErrorEventArgs e)
 {
     Helpers.ConsolePrint("SOCKET", e.ToString());
 }
 // 监视出错
 private void FileWatcher_Error(object sender, ErrorEventArgs e)
 {
     UpdateListView(new FileList(DateTime.Now.ToString("G"), "错误", "未知", e.ToString(), ""));
 }
Exemplo n.º 18
0
 private void OnError(Object sender, ErrorEventArgs e)
 {
     Console.WriteLine("Error: " + e.ToString());
 }
Exemplo n.º 19
0
 private static void Watcher_Error(object sender, ErrorEventArgs e)
 {
     Console.WriteLine("[ERROR] FileSystemWatcher: " + e.ToString());
 }
Exemplo n.º 20
0
    protected override void OnError(ErrorEventArgs e)
    {
        base.OnError(e);

        Model.UIMediator.WriteToLog("MainService Error:" + e.ToString() + "\n");
    }
 protected override void OnError(ErrorEventArgs e)
 {
     Log.Error("Error on websocket:" + ToString() + ", " + e.ToString());
     TearDown();
 }
Exemplo n.º 22
0
 private void Fsw_Error(object sender, ErrorEventArgs e)
 {
     UnrealEngine.UObject.LogInfo("Fsw_Error:" + e.ToString());
 }
Exemplo n.º 23
0
        public EventHandler <ErrorEventArgs> HandleDeserializationError(object sender, ErrorEventArgs errorArgs)
        {
            var currentError = errorArgs.ToString();

            return(null);
        }
Exemplo n.º 24
0
 private void websocket_Error(object sender, ErrorEventArgs e)
 {
     MET_LogAdd("Ошибка", e.ToString());
 }
Exemplo n.º 25
0
 private void FileError(object sender, ErrorEventArgs e)
 {
     Console.WriteLine($"File Error  {e.ToString()}");
 }
Exemplo n.º 26
0
 void ws_OnError(object sender, ErrorEventArgs e)
 {
     UpdateListBox(DateTime.Now.ToString() + " ws_OnError says: " + e.ToString());
 }
Exemplo n.º 27
0
        private void Watcher_Error(object sender, ErrorEventArgs e)
        {
            EventLog.WriteEntry(e.ToString(), EventLogEntryType.Error);

            RemoveWatcher((FileSystemWatcher)sender);
        }
Exemplo n.º 28
0
 private void OnError(object sender, ErrorEventArgs e)
 {
     Debug.WriteLine($"WebSocket Error: {e.Exception}, {e.ToString()}");
 }
Exemplo n.º 29
0
 private void OnError(object sender, ErrorEventArgs e)
 {
     Log.WriteLog("OnError called with {0}", e.ToString());
 }
 private void OnError(Object sender, ErrorEventArgs e)
 {
     _logger.Add("Session Error: " + e.ToString());
 }
Exemplo n.º 31
0
 private void Watcher_Error(object sender, ErrorEventArgs e)
 {
     Debug.WriteLine(e.ToString(), "Error");
     WriteLog($"監視エラー: {e.ToString()}");
 }