Skip to content

Commit

Permalink
Improves logging whenever reading BlobObjects (previously method only…
Browse files Browse the repository at this point in the history
… catched Exceptions, not all types of Throwables)
  • Loading branch information
anjoismysign committed Nov 30, 2023
1 parent fd8628b commit 414272f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion ci-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>us.mytheria</groupId>
<artifactId>BlobLib</artifactId>
<version>1.697.28</version>
<version>1.697.30</version>
<relativePath>pom.xml</relativePath>
</parent>
<artifactId>bloblib</artifactId>
Expand Down
6 changes: 1 addition & 5 deletions local-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>us.mytheria</groupId>
<artifactId>BlobLib</artifactId>
<version>1.697.28</version>
<version>1.697.30</version>
<relativePath>pom.xml</relativePath>
</parent>
<artifactId>bloblib</artifactId>
Expand Down Expand Up @@ -75,10 +75,6 @@
<pattern>org.apache.commons</pattern>
<shadedPattern>global.warming.commons</shadedPattern>
</relocation>
<relocation>
<pattern>net.milkbowl.vault</pattern>
<shadedPattern>nuclear.winter.vault</shadedPattern>
</relocation>
<!-- doomsday.clock.NNNEEEXXXTTT -->
</relocations>
<shadedArtifactAttached>false</shadedArtifactAttached>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>us.mytheria</groupId>
<artifactId>BlobLib</artifactId>
<version>1.697.28</version>
<version>1.697.30</version>
<packaging>pom</packaging>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ public void loadFiles(File path, CompletableFuture<Void> mainFuture) {
objectIsEditable = true;
this.addObject(blobObject.getKey(), blobObject, file);
}
} catch (Exception exception) {
Bukkit.getLogger().log(Level.SEVERE, exception.getMessage() + " \n " +
"At: " + file.getPath(), exception);
mainFuture.completeExceptionally(exception);
} catch (Throwable throwable) {
Bukkit.getLogger().log(Level.SEVERE, throwable.getMessage() + " \n " +
"At: " + file.getPath(), throwable);
mainFuture.completeExceptionally(throwable);
}
});
futures.add(fileFuture);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public MetaBlobInventoryTracker trackMetaInventory(@NotNull Player player, @NotN
}

@EventHandler
public void onLocaleChange(PlayerLocaleChangeEvent event) {
private void onLocaleChange(PlayerLocaleChangeEvent event) {
Player player = event.getPlayer();
InventoryTracker<?, ?> result = this.playerTracker.get(player.getUniqueId());
if (result == null)
Expand All @@ -88,7 +88,7 @@ public void onLocaleChange(PlayerLocaleChangeEvent event) {
}

@EventHandler
public void onClick(InventoryClickEvent event) {
private void onClick(InventoryClickEvent event) {
Inventory clickedInventory = event.getClickedInventory();
if (clickedInventory == null)
return;
Expand Down

0 comments on commit 414272f

Please sign in to comment.