From adac8414c5d7853f3a17f3e843765af8d085d818 Mon Sep 17 00:00:00 2001 From: filoghost Date: Sat, 17 Oct 2020 19:15:14 +0200 Subject: [PATCH] Improve error messages --- .../filoghost/chestcommands/listener/InventoryListener.java | 2 +- .../chestcommands/placeholder/PlaceholderManager.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/src/main/java/me/filoghost/chestcommands/listener/InventoryListener.java b/plugin/src/main/java/me/filoghost/chestcommands/listener/InventoryListener.java index 3fb007a..131eb06 100644 --- a/plugin/src/main/java/me/filoghost/chestcommands/listener/InventoryListener.java +++ b/plugin/src/main/java/me/filoghost/chestcommands/listener/InventoryListener.java @@ -102,7 +102,7 @@ public class InventoryListener implements Listener { menuDescription = "a menu created by the plugin \"" + menu.getPlugin().getName() + "\""; } - Log.severe("Encountered exception while handling a click inside " + menuDescription, throwable); + Log.severe("Encountered an exception while handling a click inside " + menuDescription, throwable); clicker.sendMessage(ChatColor.RED + "An internal error occurred when you clicked on the item."); } diff --git a/plugin/src/main/java/me/filoghost/chestcommands/placeholder/PlaceholderManager.java b/plugin/src/main/java/me/filoghost/chestcommands/placeholder/PlaceholderManager.java index bf09d4c..a4b8d38 100644 --- a/plugin/src/main/java/me/filoghost/chestcommands/placeholder/PlaceholderManager.java +++ b/plugin/src/main/java/me/filoghost/chestcommands/placeholder/PlaceholderManager.java @@ -75,9 +75,9 @@ public class PlaceholderManager { try { return placeholder.getReplacer().getReplacement(player, placeholderMatch.getArgument()); } catch (Throwable t) { - Log.severe("Encountered exception while replacing the placeholder \"" + placeholderMatch + Log.severe("Encountered an exception while replacing the placeholder \"" + placeholderMatch.getIdentifier() + "\" registered by the plugin \"" + placeholder.getPlugin().getName() + "\"", t); - return "[ERROR]"; + return "[PLACEHOLDER ERROR]"; } }); }