Log throwable when failing to save chunk/poi/entity data

This commit is contained in:
Spottedleaf 2024-07-17 11:48:24 -07:00
parent e43b9191b2
commit f9a133bd33

View File

@ -10308,7 +10308,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ } + }
+ chunk.setUnsaved(false); + chunk.setUnsaved(false);
+ } catch (final Throwable thr) { + } 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) { + if (unloading && !completing) {
+ this.completeAsyncUnloadDataSave(RegionFileIOThread.RegionFileType.CHUNK_DATA, null); + this.completeAsyncUnloadDataSave(RegionFileIOThread.RegionFileType.CHUNK_DATA, null);
+ } + }
@ -10354,7 +10354,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ this.lastEntityUnload = save; + this.lastEntityUnload = save;
+ } + }
+ } catch (final Throwable thr) { + } 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; + return true;
@ -10378,7 +10378,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ this.poiDataUnload.completable().complete(save); + this.poiDataUnload.completable().complete(save);
+ } + }
+ } catch (final Throwable thr) { + } 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; + return true;