((ValueImpl) value).writeWithTag((ValueImpl) value,
dataOutStream);
} else {
ValueImpl.writeNullWithTag(this, dataOutStream);
}
JdwpReplyPacket reply = requestVM(
JdwpCommandPacket.TR_FORCE_EARLY_RETURN, byteOutStream);
switch (reply.errorCode()) {
case JdwpReplyPacket.INVALID_THREAD:
throw new ObjectCollectedException(
JDIMessages.ThreadReferenceImpl_thread_object_invalid);
case JdwpReplyPacket.INVALID_OBJECT:
throw new ClassNotLoadedException(
JDIMessages.ThreadReferenceImpl_thread_or_value_unknown);
case JdwpReplyPacket.THREAD_NOT_SUSPENDED:
case JdwpReplyPacket.THREAD_NOT_ALIVE:
throw new IncompatibleThreadStateException(
JDIMessages.ThreadReferenceImpl_thread_not_suspended);
case JdwpReplyPacket.NOT_IMPLEMENTED:
throw new UnsupportedOperationException(
JDIMessages.ThreadReferenceImpl_no_force_early_return_on_threads);
case JdwpReplyPacket.OPAQUE_FRAME:
throw new NativeMethodException(
JDIMessages.ThreadReferenceImpl_thread_cannot_force_native_method);
case JdwpReplyPacket.NO_MORE_FRAMES:
throw new InvalidStackFrameException(
JDIMessages.ThreadReferenceImpl_thread_no_stackframes);
case JdwpReplyPacket.TYPE_MISMATCH:
throw new InvalidTypeException(
JDIMessages.ThreadReferenceImpl_incapatible_return_type);
case JdwpReplyPacket.VM_DEAD:
throw new VMDisconnectedException(JDIMessages.vm_dead);
}
defaultReplyErrorHandler(reply.errorCode());
} catch (IOException e) {
defaultIOExceptionHandler(e);
} finally {
handledJdwpRequest();
}