Skip to content

Commit

Permalink
Log throwable when failing to save chunk/poi/entity data
Browse files Browse the repository at this point in the history
  • Loading branch information
Spottedleaf committed Jul 17, 2024
1 parent 59c3043 commit 4995ec5
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1813,7 +1813,7 @@ private boolean saveChunk(final ChunkAccess chunk, final boolean unloading) {
}
chunk.setUnsaved(false);
} catch (final Throwable thr) {
LOGGER.error("Failed to save chunk data (" + this.chunkX + "," + this.chunkZ + ") in world '" + WorldUtil.getWorldName(this.world) + "'");
LOGGER.error("Failed to save chunk data (" + this.chunkX + "," + this.chunkZ + ") in world '" + WorldUtil.getWorldName(this.world) + "'", thr);
if (unloading && !completing) {
this.completeAsyncUnloadDataSave(RegionFileIOThread.RegionFileType.CHUNK_DATA, null);
}
Expand Down Expand Up @@ -1859,7 +1859,7 @@ private boolean saveEntities(final ChunkEntitySlices entities, final boolean unl
this.lastEntityUnload = save;
}
} catch (final Throwable thr) {
LOGGER.error("Failed to save entity data (" + this.chunkX + "," + this.chunkZ + ") in world '" + WorldUtil.getWorldName(this.world) + "'");
LOGGER.error("Failed to save entity data (" + this.chunkX + "," + this.chunkZ + ") in world '" + WorldUtil.getWorldName(this.world) + "'", thr);
}

return true;
Expand All @@ -1883,7 +1883,7 @@ private boolean savePOI(final PoiChunk poi, final boolean unloading) {
this.poiDataUnload.completable().complete(save);
}
} catch (final Throwable thr) {
LOGGER.error("Failed to save poi data (" + this.chunkX + "," + this.chunkZ + ") in world '" + WorldUtil.getWorldName(this.world) + "'");
LOGGER.error("Failed to save poi data (" + this.chunkX + "," + this.chunkZ + ") in world '" + WorldUtil.getWorldName(this.world) + "'", thr);
}

return true;
Expand Down

0 comments on commit 4995ec5

Please sign in to comment.