From 94f90efcf143d21eb87c99a94afc39266ae573d5 Mon Sep 17 00:00:00 2001 From: Govindas Date: Thu, 22 Oct 2020 17:44:45 +0300 Subject: [PATCH] Make json errors easier to debug --- src/main/java/net/limework/core/managers/RedisManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/limework/core/managers/RedisManager.java b/src/main/java/net/limework/core/managers/RedisManager.java index 2b48936..02084b4 100644 --- a/src/main/java/net/limework/core/managers/RedisManager.java +++ b/src/main/java/net/limework/core/managers/RedisManager.java @@ -124,8 +124,8 @@ public class RedisManager extends BinaryJedisPubSub implements Runnable, Command @Override public void onMessage(byte[] channel, byte[] message) { String channelString = new String(channel, StandardCharsets.UTF_8); + String receivedMessage = null; try { - String receivedMessage = null; //if encryption is enabled, decrypt the message, else just convert binary to string if (this.encryption.isEncryptionEnabled()) { try { @@ -146,7 +146,8 @@ public class RedisManager extends BinaryJedisPubSub implements Runnable, Command } } catch (Exception e) { e.printStackTrace(); - Bukkit.getLogger().warning(ChatColor.translateAlternateColorCodes('&', "&2[&aRediSkript&a] &cI got a message that was empty from channel " + channelString + " please check your code that you used to send the message. ^ ignore the error.")); + Bukkit.getLogger().warning(ChatColor.translateAlternateColorCodes('&', "&2[&aRediSkript&a] &cI got a message that was empty from channel " + channelString + " please check your code that you used to send the message. Message content:")); + Bukkit.getLogger().warning(receivedMessage); } }