예제 #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);
            }
        }
예제 #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;
        }
예제 #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();
            }
        }
예제 #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);
            }
        }
예제 #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());
 }
예제 #8
0
 void watcher_Error(object sender, ErrorEventArgs e)
 {
     System.Diagnostics.Debug.WriteLine(e.ToString());
 }
예제 #9
0
파일: Form1.cs 프로젝트: GuojieChen/PirateX
 private void OnError(object sender, ErrorEventArgs e)
 {
     MessageBox.Show(e.ToString());
 }
예제 #10
0
 protected override void OnError(ErrorEventArgs e)
 {
     Debug.Log("server error: " + e.ToString());
     Debug.Log("server error: " + e.Message);
 }
예제 #11
0
 void FsWatcher_Error(object sender, ErrorEventArgs e)
 {
     Logger.LogError(e.ToString());
     _action();
 }
예제 #12
0
 private void ws_BoyOnError(object sender, ErrorEventArgs e)
 {
     Debug.Log("Error : " + e.ToString());
     ErrorCheck(e.ToString());
 }
예제 #13
0
 private void ClientSession_Error(object sender, ErrorEventArgs e)
 {
     NoticeAdmin($"检测程序客户端连接错误错误 : {e.ToString()}  \n Exception: {e.Exception?.ToString()}");
 }
예제 #14
0
파일: ManageForm.cs 프로젝트: SuPair/vpn-1
 public void Dialer_Error(object source, ErrorEventArgs e)
 {
     MessageBox.Show(e.ToString());
 }
예제 #15
0
 void SqlTableDependency_OnError(object sender, ErrorEventArgs e)
 {
     Clients.All.onError(e.ToString());
     throw e.Error;
 }
예제 #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(), ""));
 }
예제 #18
0
파일: SellSide.cs 프로젝트: zeropool/Vigoth
 private void OnError(Object sender, ErrorEventArgs e)
 {
     Console.WriteLine("Error: " + e.ToString());
 }
예제 #19
0
 private static void Watcher_Error(object sender, ErrorEventArgs e)
 {
     Console.WriteLine("[ERROR] FileSystemWatcher: " + e.ToString());
 }
예제 #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();
 }
예제 #22
0
파일: Main.cs 프로젝트: ycllz/UnrealCS
 private void Fsw_Error(object sender, ErrorEventArgs e)
 {
     UnrealEngine.UObject.LogInfo("Fsw_Error:" + e.ToString());
 }
예제 #23
0
파일: MTG.cs 프로젝트: kbmacneal/timebot
        public EventHandler <ErrorEventArgs> HandleDeserializationError(object sender, ErrorEventArgs errorArgs)
        {
            var currentError = errorArgs.ToString();

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

            RemoveWatcher((FileSystemWatcher)sender);
        }
예제 #28
0
 private void OnError(object sender, ErrorEventArgs e)
 {
     Debug.WriteLine($"WebSocket Error: {e.Exception}, {e.ToString()}");
 }
예제 #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());
 }
예제 #31
0
 private void Watcher_Error(object sender, ErrorEventArgs e)
 {
     Debug.WriteLine(e.ToString(), "Error");
     WriteLog($"監視エラー: {e.ToString()}");
 }