remove com.sun.jdi.VMDisconnectedException from reasonable places.#104
Merged
remove com.sun.jdi.VMDisconnectedException from reasonable places.#104
Conversation
yaohaizh
previously approved these changes
Nov 14, 2017
org.eclipse.jdi.internal.connect.PacketSendManagersendPacket at PacketSendManager.java Line 90
org.eclipse.jdi.internal.MirrorImplrequestVM at MirrorImpl.java Line 187
org.eclipse.jdi.internal.MirrorImplrequestVM at MirrorImpl.java Line 268
org.eclipse.jdi.internal.VirtualMachineImplgetIDSizes at VirtualMachineImpl.java Line 984
org.eclipse.jdi.internal.VirtualMachineImplpacketSendManager at VirtualMachineImpl.java Line 343
org.eclipse.jdi.internal.MirrorImplrequestVM at MirrorImpl.java Line 187
org.eclipse.jdi.internal.MirrorImplrequestVM at MirrorImpl.java Line 268
org.eclipse.jdi.internal.VirtualMachineImplgetVersionInfo at VirtualMachineImpl.java Line 1010
org.eclipse.jdi.internal.VirtualMachineImplversion at VirtualMachineImpl.java Line 939
com.microsoft.java.debug.core.adapter.handler.AttachRequestHandlerhandle at AttachRequestHandler.java Line 65
com.microsoft.java.debug.core.adapter.DebugAdapterdispatchRequest at DebugAdapter.java Line 80
com.microsoft.java.debug.core.adapter.ProtocolServerdispatchRequest at ProtocolServer.java Line 66
com.microsoft.java.debug.core.protocol.AbstractProtocolServerprocessData at AbstractProtocolServer.java Line 166
com.microsoft.java.debug.core.protocol.AbstractProtocolServerstart at AbstractProtocolServer.java Line 80
com.microsoft.java.debug.core.adapter.ProtocolServerstart at ProtocolServer.java Line 53
com.microsoft.java.debug.plugin.internal.JavaDebugServer$2run at JavaDebugServer.java Line 136
java.util.concurrent.Executors$RunnableAdaptercall at Executors.java Line 514
java.util.concurrent.FutureTaskrun at FutureTask.java Line 264
java.util.concurrent.ThreadPoolExecutorrunWorker at ThreadPoolExecutor.java Line 1167
java.util.concurrent.ThreadPoolExecutor$Workerrun at ThreadPoolExecutor.java Line 641
java.lang.Threadrun at Thread.java Line 844
…onfigurationDone request.
…en debug session is actually useless after jvm terminates.
yaohaizh
previously approved these changes
Nov 17, 2017
akaroml
requested changes
Nov 17, 2017
| context.sendEvent(Events.OutputEvent.createConsoleOutput(warnMessage)); | ||
| } | ||
| } | ||
| } catch (VMDisconnectedException e) { |
Member
There was a problem hiding this comment.
This exception seems like a common one for all the handlers. Can we handle them at the framework level?
…happening, since it is normal to have received terminated message during process vscode requests, return an empty response since the debug session is terminated.
| try { | ||
| vm.eventRequestManager().deleteEventRequests(requests()); | ||
| } catch (VMDisconnectedException ex) { | ||
| // ignore since removing breakpoints is meanness when JVM is terminated. |
# Conflicts: # com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/DebugAdapter.java # com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/handler/ThreadsRequestHandler.java
# Conflicts: # com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/DebugAdapter.java # com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/handler/ThreadsRequestHandler.java
testforstephen
previously approved these changes
Nov 22, 2017
akaroml
requested changes
Nov 29, 2017
| @@ -68,16 +70,32 @@ protected void dispatchRequest(Messages.Request request) { | |||
| this.debugAdapter.dispatchRequest(request).whenComplete((response, ex) -> { | |||
| "The request dispatcher should not return null response.")); | ||
| } | ||
| } | ||
| }).whenComplete((r, e) -> { |
| ErrorCode.UNKNOWN_FAILURE, | ||
| "The request dispatcher should not return null response.")); | ||
| response = new Messages.Response(request.seq, request.command); | ||
| if (ex != null) { |
Member
There was a problem hiding this comment.
Put the exception handling logic into the exceptionally() handler.
| @@ -68,16 +70,32 @@ protected void dispatchRequest(Messages.Request request) { | |||
| this.debugAdapter.dispatchRequest(request).whenComplete((response, ex) -> { | |||
| if (response != null) { | |||
Member
There was a problem hiding this comment.
Don't need to check response for null value when using thenAccept.
# Conflicts: # com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/ProtocolServer.java # com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/handler/ThreadsRequestHandler.java
# Conflicts: # com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/ProtocolServer.java # com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/handler/ThreadsRequestHandler.java
This was referenced Dec 1, 2017
Closed
akaroml
approved these changes
Dec 2, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#59