protected virtual void OnErrorOccured(ErrorEventArgs e) { try { EventHandler<ErrorEventArgs> handler = ErrorOccured; if (handler != null) handler(this, e); } catch (Exception esc) { Debug.WriteLine(esc.Message); } }
void data_Error(object sender, ErrorEventArgs args) { var d = (IDispatchData)sender; OnError(new ErrorEventArgs() { Exception = new Exception("Error sending " + d.ModuleName + ": " + args.Exception.Message) }); }
protected virtual void OnError(ErrorEventArgs e) { EventHandler<ErrorEventArgs> handler = Error; if (handler != null) handler(this, e); }
private void AutoConectWebSocket_OnError(object sender, ErrorEventArgs e) { Common.LogRecord.Error("AutoConectWebSocket", string.Format("Client error {0}. Message:{1}", Url, e.Message)); }