public static RuntimeException handleLeadNodeRuntimeException( RuntimeException re) { Throwable cause = re; if (re instanceof GemFireXDRuntimeException || re instanceof FunctionException || re instanceof FunctionExecutionException || re instanceof ReplyException) { cause = re.getCause(); } if (cause instanceof RegionDestroyedException) { RegionDestroyedException rde = (RegionDestroyedException)cause; // don't mark as remote so that no retry is done (SNAP-961) // a top-level exception can only have been from lead node itself if (rde.isRemote()) rde.setNotRemote(); } if (cause instanceof DiskAccessException) { DiskAccessException dae = (DiskAccessException)cause; // don't mark as remote so that no retry is done (SNAP-961) // a top-level exception can only have been from lead node itself if (dae.isRemote()) dae.setNotRemote(); } return re; }