private Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure> handleChunkLoadFailure(Throwable throwable, ChunkPos chunkPos) { // In ChunkMap.java
if (throwable instanceof ReportedException reportedException) {
Throwable throwable2 = reportedException.getCause();
if (!(throwable2 instanceof IOException)) {
this.markPositionReplaceable(chunkPos);
throw reportedException;
}
LOGGER.error("Couldn't load chunk {}", chunkPos, throwable2);
} else if (throwable instanceof IOException) {
LOGGER.error("Couldn't load chunk {}", chunkPos, throwable);
}
return Either.left(this.createEmptyChunk(chunkPos));
}
(From ChunkMap.java)
If the error is not IOException
, it is simply ignored. Errors converting chunks using DFU fall into the ignored category here.
The exception should be logged as long as it's not ThreadDeath
. ThreadDeath
should be re-thrown, however that's impossible when using CompletableFuture
.
Comments 0
No comments.