private void Listener_OnError(object sender, ErrorMessageEventArgs a) { if (ErrorMessageRecieved != null) { ErrorMessageRecieved(sender, new ErrorMessageEventArgs(a.Code, a.Message)); } }
void myPatchProgress_OnError(object sender, ErrorMessageEventArgs e) { if (OnError != null) { OnError(sender, e); } }
void myPatcher_OnError(object sender, ErrorMessageEventArgs e) { if (OnError != null) { OnError(this, e); } }
protected virtual void OnErrorOccured(ErrorMessageEventArgs e) { if (ErrorOccured != null) { ErrorOccured(this, e); } }
void myPatcher_OnError(object sender, ErrorMessageEventArgs e) { if (OnError != null) { OnError(this, e); } }
private async Task DispatchErrorMessage(SqlConnection dbconnection, SSSBMessage message, ErrorMessage msgerr, CancellationToken token) { try { // для каждого типа сообщения можно добавить нестандартную обработку // которое не может быть обработано // например: сохранить тело сообщения в логе IMessageHandler <ErrorMessageEventArgs> errorMessageHandler; if (_errorMessageHandlers.TryGetValue(message.MessageType, out errorMessageHandler)) { using (TransactionScope transactionScope = new TransactionScope(TransactionScopeOption.Suppress, TransactionScopeAsyncFlowOption.Enabled)) { ErrorMessageEventArgs errArgs = new ErrorMessageEventArgs(message, this._sssbService, msgerr.FirstError, token); errArgs = await errorMessageHandler.HandleMessage(this._sssbService, errArgs); transactionScope.Complete(); } } await _standardMessageHandlers.EndDialogMessageWithErrorHandler(dbconnection, message, msgerr.FirstError.Message, 4); string error = string.Format("Message {0} caused MAX Number of errors '{1}'. Dialog aborted!", message.MessageType, msgerr.FirstError.Message); _logger.LogError(error); } catch (Exception ex) { _logger.LogCritical(ErrorHelper.GetFullMessage(ex)); } }
protected void OnErrorMessageChanged(ErrorMessageEventArgs e) { EventHandler <ErrorMessageEventArgs> handler = DataRowErrorInfo; if (handler != null) { handler(this, e); } }
/// <summary> /// Will raise an alarm event /// </summary> /// <param name="e">The event arguments that should be passed</param> protected virtual void OnRaiseErrorMessageEvent(ErrorMessageEventArgs e) { EventHandler <ErrorMessageEventArgs> handler = RaiseErrorMessage; if (handler != null) { handler(this, e); } }
private void Server_ErrorMessageRecieved(object sender, ErrorMessageEventArgs e) { if (e.Code == ReplyCode.ERR_NOMOTD) { Debug.WriteLine("Message ignored: " + e.Code); return; } ChatLines.Add(new IrcErrorViewModel(DateTime.Now, e.Message, e.Code.ToString())); }
private void ParentServer_OnError(object sender, ErrorMessageEventArgs a) { if (a.Code == ReplyCode.ERR_NOMOTD) { Debug.WriteLine("Message ignored: " + a.Code); return; } AddLine(string.Format("{0} {1}", a.Code, a.Message)); }
private void OnErrorMessage(object sender, ErrorMessageEventArgs e) { // Az errorService által küldött üzenetet egy label-en megjeleníti, // vagy errorType-tól függőn MesseageBox-ban is megjelenítheti a hibaüzenetet if (e.errorType == ErrorType.DatabaseError) { MessageBox.Show(e.message); } else { errorLabel.Text = e.message; } }
/// <summary> /// 에러 그리드뷰 출력 이벤트 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void HandleErrorInfoChanged(object sender, ErrorMessageEventArgs e) { this.dataGridViewBMSErrorHistory.SafeInvoke(d => d.Rows.Add(e.DataRowErrorInfo["Error Time"], e.DataRowErrorInfo["COM"], e.DataRowErrorInfo["BMS ID"], e.DataRowErrorInfo["Error Code"], e.DataRowErrorInfo["Error Value"])); this.dataGridViewBMSErrorHistory.SafeInvoke(d => d.CurrentCell = d.Rows[d.Rows.Count - 1].Cells[0]); // 메인폼으로 에러 상태 전달 ( 에러발생시 탭페이지 점멸 됨 ) int error = e.DataRowErrorInfo["Error Code"].ToString().IndexOf("Cancel"); ErrorTabPageDrawEventArgs tabPageDrawEvent; // 에러발생 if (error == -1) { // 에러 발생 갯수 증가 mErrorCount++; ErrorTabPageDrawClass tabPageDrawValue = new ErrorTabPageDrawClass(this.Com, true); tabPageDrawEvent = new ErrorTabPageDrawEventArgs(tabPageDrawValue); OnErrorMessageChanged(tabPageDrawEvent); } else { if (mErrorCount > 0) { // 에러 발생 갯수 감소 mErrorCount--; } int comError = e.DataRowErrorInfo["Error Code"].ToString().IndexOf("COM"); // COM 에러일경우는 점멸을 바로 없애준다. if (comError >= 0) { mErrorCount = 0; ErrorTabPageDrawClass tabPageDrawValue = new ErrorTabPageDrawClass(this.Com, false); tabPageDrawEvent = new ErrorTabPageDrawEventArgs(tabPageDrawValue); OnErrorMessageChanged(tabPageDrawEvent); } } // 모든 에러가 취소될경우 점멸끄기 if (error > 0 && mErrorCount == 0) { ErrorTabPageDrawClass tabPageDrawValue = new ErrorTabPageDrawClass(this.Com, false); tabPageDrawEvent = new ErrorTabPageDrawEventArgs(tabPageDrawValue); OnErrorMessageChanged(tabPageDrawEvent); } }
private void OutputView_ErrorMessageSelected(object sender, ErrorMessageEventArgs e) { bool found = _ProjectManager.FindError(e.Output); if (found) { foreach (PageViewModel page in _ProjectManager.Editor.Items) { if (page.Filename == e.Output.Filename) { page.IsActive = true; } } } }
private void TvVideoViewModel_ErrorMessageArised(object sender, ErrorMessageEventArgs e) { // // Current member / type: System.Void SmartView2.ViewModels.TvVideoViewModel::TvVideoViewModel_ErrorMessageArised(System.Object,SmartView2.Core.ErrorMessageEventArgs) // File path: C:\Program Files (x86)\SmartView2\Smart View 2.0.exe // // Product version: 2016.1.316.0 // Exception in: System.Void TvVideoViewModel_ErrorMessageArised(System.Object,SmartView2.Core.ErrorMessageEventArgs) // // The given key was not present in the dictionary. // at System.Collections.Generic.Dictionary`2.get_Item(TKey key) // at ..() in c:\Builds\245\Behemoth\ReleaseBranch Production Build NT\Sources\OpenSource\Cecil.Decompiler\Decompiler\GotoElimination\GotoCancelation.cs:line 61 // at ..() in c:\Builds\245\Behemoth\ReleaseBranch Production Build NT\Sources\OpenSource\Cecil.Decompiler\Decompiler\GotoElimination\GotoCancelation.cs:line 35 // at ..( , ) in c:\Builds\245\Behemoth\ReleaseBranch Production Build NT\Sources\OpenSource\Cecil.Decompiler\Decompiler\GotoElimination\GotoCancelation.cs:line 26 // at ..(MethodBody , , ILanguage ) in c:\Builds\245\Behemoth\ReleaseBranch Production Build NT\Sources\OpenSource\Cecil.Decompiler\Decompiler\DecompilationPipeline.cs:line 88 // at ..(MethodBody , ILanguage ) in c:\Builds\245\Behemoth\ReleaseBranch Production Build NT\Sources\OpenSource\Cecil.Decompiler\Decompiler\DecompilationPipeline.cs:line 70 // at ..( , ILanguage , MethodBody , & ) in c:\Builds\245\Behemoth\ReleaseBranch Production Build NT\Sources\OpenSource\Cecil.Decompiler\Decompiler\Extensions.cs:line 99 // at ..(MethodBody , ILanguage , & , ) in c:\Builds\245\Behemoth\ReleaseBranch Production Build NT\Sources\OpenSource\Cecil.Decompiler\Decompiler\Extensions.cs:line 62 // at ..(ILanguage , MethodDefinition , ) in c:\Builds\245\Behemoth\ReleaseBranch Production Build NT\Sources\OpenSource\Cecil.Decompiler\Decompiler\WriterContextServices\BaseWriterContextService.cs:line 117 // // mailto: [email protected] }
void bus_OnErrorMessage(object sender, ErrorMessageEventArgs e) { ErrorMessageEventCalled = true; }
private void ParentServer_OnError(object sender, ErrorMessageEventArgs a) { AddLine(ServerStrings.ServerErrorMessage.With(a.Code, a.Message)); }
void OnErrorOccured(object sender, ErrorMessageEventArgs e) { MessageBox.Show(e.ErrorMessage, "Error", MessageBoxButton.OK, MessageBoxImage.Error); }
void reqService_OnError(object sender, ErrorMessageEventArgs e) { QueueError(e.Request, e.Error); }
private void Listener_OnError(object sender, ErrorMessageEventArgs a) { ErrorMessageRecieved?.Invoke(sender, new ErrorMessageEventArgs(a.Code, a.Message)); }
void _bus_OnErrorMessage(object sender, ErrorMessageEventArgs e) { Debug.PresenterRecievedErrorMessage(); _view.RevievingErrorMessage(e.Message); }
void myPatchProgress_OnError(object sender, ErrorMessageEventArgs e) { if (OnError != null) { OnError(sender, e); } }
void _bus_OnErrorMessage(object sender, ErrorMessageEventArgs e) { _threadException = e.Message.Error; }
private void ErrorMessage_Raised(object sender, ErrorMessageEventArgs e) { Console.WriteLine($"{DateTime.Now:MM/dd HH: mm:ss}"); }
private void HandleErrorMessage(object sender, ErrorMessageEventArgs args) { lock (syncObject) { errorMessages.Add(args.Message); } }
private void TargetDevice_ErrorMessageArised(object sender, ErrorMessageEventArgs e) { this.messagePopup.Show(e.MessageType); }