Ejemplo n.º 1
0
 public void OnHandleError(object sender, ErrorHandlerEventArgs errorEventArgs)
 {
     if (this.HandleError != null)
     {
         this.HandleError(sender, errorEventArgs);
     }
 }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 3
0
        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));
        }
Ejemplo n.º 4
0
 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);
     }
 }
Ejemplo n.º 5
0
 /// <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);
     }
 }
Ejemplo n.º 6
0
        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);
            }
        }
Ejemplo n.º 7
0
        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);
            }
        }
Ejemplo n.º 8
0
        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));
        }
Ejemplo n.º 9
0
 public void OnHandleError(object sender, ErrorHandlerEventArgs e)
 {
     this.events.OnHandleError(sender, e);
 }
Ejemplo n.º 10
0
 void locationTracker_ErrorHandler(object sender, ErrorHandlerEventArgs e)
 {
     ErrorOccured(this, e.error);
 }