public void OnHandleError(object sender, ErrorHandlerEventArgs errorEventArgs) { if (this.HandleError != null) { this.HandleError(sender, errorEventArgs); } }
internal void ErrorHandler(object sender, ErrorHandlerEventArgs args) { switch (args.ErrorCode) { case ErrorCode.INVALID_OBJECT: throw new ObjectCollectedException(); case ErrorCode.INVALID_FRAMEID: throw new InvalidStackFrameException(); case ErrorCode.NOT_SUSPENDED: throw new InvalidOperationException("The vm is not suspended."); case ErrorCode.NOT_IMPLEMENTED: throw new NotSupportedException("This request is not supported by the protocol version implemented by the debuggee."); case ErrorCode.ABSENT_INFORMATION: throw new AbsentInformationException(); case ErrorCode.NO_SEQ_POINT_AT_IL_OFFSET: throw new ArgumentException("Cannot set breakpoint on the specified IL offset."); default: throw new CommandException(args.ErrorCode); } }
private void HandleConnErrorHandler(object sender, ErrorHandlerEventArgs args) { Console.WriteLine("Error: {0}", args.ErrorCode); switch (args.ErrorCode) { case ErrorCode.NOT_IMPLEMENTED: throw new NotSupportedException("This request is not supported by the protocol version implemented by the debuggee."); case ErrorCode.NOT_SUSPENDED: throw new InvalidOperationException("The vm is not suspended."); case ErrorCode.ABSENT_INFORMATION: throw new AbsentInformationException(); case ErrorCode.NO_SEQ_POINT_AT_IL_OFFSET: throw new ArgumentException("Cannot set breakpoint on the specified IL offset."); case ErrorCode.INVALID_FRAMEID: throw new InvalidStackFrameException(); case ErrorCode.INVALID_OBJECT: throw new ObjectCollectedException(); } throw new NotImplementedException(String.Format("{0}", args.ErrorCode)); }
public DialogResult OnError(string pError) { if (this.Error != null) { ErrorHandlerEventArgs args = new ErrorHandlerEventArgs(pError); this.Error(this, args); return(args.Result); } else { return(DialogResult.Cancel); } }
/// <summary> /// Handles ViewModel exceptions /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void viewModelEvents_HandleError(object sender, ErrorHandlerEventArgs e) { if (e is UnexpectedErrorHandlerEventArgs) { viewModelEvents.OnUserFeedback(sender, new UserFeedbackUnexpectedErrorEventArgs(((UnexpectedErrorHandlerEventArgs)e).Exception)); } else if (e is ExpectedErrorHandlerEventArgs) { viewModelEvents.OnUserFeedback(sender, new UserFeedbackErrorEventArgs(((ExpectedErrorHandlerEventArgs)e).ErrorText)); } else { throw new NotImplementedException("Unknown ViewModelErrorHandlerEventArgs; " + e.GetType().Name); } }
internal void ErrorHandler(object sender, ErrorHandlerEventArgs args) { switch (args.ErrorCode) { case ErrorCode.INVALID_OBJECT: throw new ObjectCollectedException(); case ErrorCode.INVALID_FRAMEID: throw new InvalidStackFrameException(); case ErrorCode.NOT_SUSPENDED: throw new InvalidOperationException("The vm is not suspended."); default: throw new CommandException(args.ErrorCode); } }
internal void ErrorHandler(object sender, ErrorHandlerEventArgs args) { switch (args.ErrorCode) { case ErrorCode.INVALID_OBJECT: throw new ObjectCollectedException(); case ErrorCode.INVALID_FRAMEID: throw new InvalidStackFrameException(); case ErrorCode.NOT_SUSPENDED: throw new InvalidOperationException("The vm is not suspended."); case ErrorCode.NOT_IMPLEMENTED: throw new NotSupportedException("This request is not supported by the protocol version implemented by the debuggee."); default: throw new CommandException(args.ErrorCode); } }
public void OnHandleError(object sender, ErrorHandlerEventArgs e) { this.events.OnHandleError(sender, e); }
void locationTracker_ErrorHandler(object sender, ErrorHandlerEventArgs e) { ErrorOccured(this, e.error); }