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); } }
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; }
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(); } }
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); } }
/// <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()); }
void watcher_Error(object sender, ErrorEventArgs e) { System.Diagnostics.Debug.WriteLine(e.ToString()); }
private void OnError(object sender, ErrorEventArgs e) { MessageBox.Show(e.ToString()); }
protected override void OnError(ErrorEventArgs e) { Debug.Log("server error: " + e.ToString()); Debug.Log("server error: " + e.Message); }
void FsWatcher_Error(object sender, ErrorEventArgs e) { Logger.LogError(e.ToString()); _action(); }
private void ws_BoyOnError(object sender, ErrorEventArgs e) { Debug.Log("Error : " + e.ToString()); ErrorCheck(e.ToString()); }
private void ClientSession_Error(object sender, ErrorEventArgs e) { NoticeAdmin($"检测程序客户端连接错误错误 : {e.ToString()} \n Exception: {e.Exception?.ToString()}"); }
public void Dialer_Error(object source, ErrorEventArgs e) { MessageBox.Show(e.ToString()); }
void SqlTableDependency_OnError(object sender, ErrorEventArgs e) { Clients.All.onError(e.ToString()); throw e.Error; }
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(), "")); }
private void OnError(Object sender, ErrorEventArgs e) { Console.WriteLine("Error: " + e.ToString()); }
private static void Watcher_Error(object sender, ErrorEventArgs e) { Console.WriteLine("[ERROR] FileSystemWatcher: " + e.ToString()); }
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(); }
private void Fsw_Error(object sender, ErrorEventArgs e) { UnrealEngine.UObject.LogInfo("Fsw_Error:" + e.ToString()); }
public EventHandler <ErrorEventArgs> HandleDeserializationError(object sender, ErrorEventArgs errorArgs) { var currentError = errorArgs.ToString(); return(null); }
private void websocket_Error(object sender, ErrorEventArgs e) { MET_LogAdd("Ошибка", e.ToString()); }
private void FileError(object sender, ErrorEventArgs e) { Console.WriteLine($"File Error {e.ToString()}"); }
void ws_OnError(object sender, ErrorEventArgs e) { UpdateListBox(DateTime.Now.ToString() + " ws_OnError says: " + e.ToString()); }
private void Watcher_Error(object sender, ErrorEventArgs e) { EventLog.WriteEntry(e.ToString(), EventLogEntryType.Error); RemoveWatcher((FileSystemWatcher)sender); }
private void OnError(object sender, ErrorEventArgs e) { Debug.WriteLine($"WebSocket Error: {e.Exception}, {e.ToString()}"); }
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()); }
private void Watcher_Error(object sender, ErrorEventArgs e) { Debug.WriteLine(e.ToString(), "Error"); WriteLog($"監視エラー: {e.ToString()}"); }