forked from Limework/RediSkript
Make json errors easier to debug
This commit is contained in:
parent
97aa663bfd
commit
2049616f64
@ -124,8 +124,8 @@ public class RedisManager extends BinaryJedisPubSub implements Runnable, Command
|
|||||||
@Override
|
@Override
|
||||||
public void onMessage(byte[] channel, byte[] message) {
|
public void onMessage(byte[] channel, byte[] message) {
|
||||||
String channelString = new String(channel, StandardCharsets.UTF_8);
|
String channelString = new String(channel, StandardCharsets.UTF_8);
|
||||||
try {
|
|
||||||
String receivedMessage = null;
|
String receivedMessage = null;
|
||||||
|
try {
|
||||||
//if encryption is enabled, decrypt the message, else just convert binary to string
|
//if encryption is enabled, decrypt the message, else just convert binary to string
|
||||||
if (this.encryption.isEncryptionEnabled()) {
|
if (this.encryption.isEncryptionEnabled()) {
|
||||||
try {
|
try {
|
||||||
@ -146,7 +146,8 @@ public class RedisManager extends BinaryJedisPubSub implements Runnable, Command
|
|||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user