use of org.apache.geode.pdx.PdxConfigurationException in project geode by apache.
the class GatewayReceiverCommand method writeFatalException.
private static void writeFatalException(Message origMsg, Throwable exception, ServerConnection servConn, int batchId) throws IOException {
Message errorMsg = servConn.getErrorResponseMessage();
errorMsg.setMessageType(MessageType.EXCEPTION);
errorMsg.setNumberOfParts(2);
errorMsg.setTransactionId(origMsg.getTransactionId());
// they can deserialize.
if ((servConn.getClientVersion() == null || servConn.getClientVersion().compareTo(Version.GFE_80) < 0) && exception instanceof PdxRegistryMismatchException) {
PdxConfigurationException newException = new PdxConfigurationException(exception.getMessage());
newException.setStackTrace(exception.getStackTrace());
exception = newException;
}
errorMsg.addObjPart(exception);
// errorMsg.addStringPart(be.toString());
errorMsg.send(servConn);
logger.warn(LocalizedMessage.create(LocalizedStrings.ProcessBatch_0_WROTE_BATCH_EXCEPTION, servConn.getName()), exception);
}
Aggregations