private void handleOperationError(Operation op, Throwable e) {
if (e instanceof OutOfMemoryError) {
OutOfMemoryErrorDispatcher.onOutOfMemory((OutOfMemoryError) e);
}
op.logError(e);
ResponseHandler responseHandler = op.getResponseHandler();
if (op.returnsResponse() && responseHandler != null) {
try {
if (node.isActive()) {
responseHandler.sendResponse(e);
} else if (responseHandler.isLocal()) {
responseHandler.sendResponse(new HazelcastInstanceNotActiveException());
}
} catch (Throwable t) {
logger.warning("While sending op error... op: " + op + ", error: " + e, t);
}
}