} else if (isErrorResponse(msgType)) { throw new ServerOperationException(part.getString()); } else {
/** * Process a response that contains a single Object result. * * @param msg the message containing the response * @param opName text describing this op * @return the result of the response * @throws Exception if response could not be processed or we received a response with a server * exception. */ protected Object processObjResponse(Message msg, String opName) throws Exception { Part part = msg.getPart(0); final int msgType = msg.getMessageType(); if (msgType == MessageType.RESPONSE) { return part.getObject(); } else { if (msgType == MessageType.EXCEPTION) { String s = "While performing a remote " + opName; throw new ServerOperationException(s, (Throwable) part.getObject()); // Get the exception toString part. // This was added for c++ thin client and not used in java } else if (isErrorResponse(msgType)) { throw new ServerOperationException(part.getString()); } else { throw new InternalGemFireError("Unexpected message type " + MessageType.getString(msgType)); } } }
} else if (isErrorResponse(msgType)) { msg.receiveChunk(); Part part = msg.getPart(0);