aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/net/elytrium/limboauth/command/ForceUnregisterCommand.java
diff options
context:
space:
mode:
authorPetr Ilin <hevav@hevav.dev>2023-01-02 23:48:06 +0300
committerPetr Ilin <hevav@hevav.dev>2023-01-02 23:48:06 +0300
commitade67d8df404f1e3f264dcd90f815722f719a1cd (patch)
tree55aae66df5ee70d708fc96f5df593ea98d96a0a0 /src/main/java/net/elytrium/limboauth/command/ForceUnregisterCommand.java
parent711a554a773184610b183405276ccc516907d872 (diff)
downloadLimboAuth-ade67d8df404f1e3f264dcd90f815722f719a1cd.tar.gz
LimboAuth-ade67d8df404f1e3f264dcd90f815722f719a1cd.tar.bz2
LimboAuth-ade67d8df404f1e3f264dcd90f815722f719a1cd.zip
Correctly use Exceptions
Diffstat (limited to 'src/main/java/net/elytrium/limboauth/command/ForceUnregisterCommand.java')
-rw-r--r--src/main/java/net/elytrium/limboauth/command/ForceUnregisterCommand.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/net/elytrium/limboauth/command/ForceUnregisterCommand.java b/src/main/java/net/elytrium/limboauth/command/ForceUnregisterCommand.java
index 3d2f9ed..3acc2d0 100644
--- a/src/main/java/net/elytrium/limboauth/command/ForceUnregisterCommand.java
+++ b/src/main/java/net/elytrium/limboauth/command/ForceUnregisterCommand.java
@@ -31,6 +31,7 @@ import net.elytrium.limboauth.LimboAuth;
import net.elytrium.limboauth.Settings;
import net.elytrium.limboauth.event.AuthUnregisterEvent;
import net.elytrium.limboauth.model.RegisteredPlayer;
+import net.elytrium.limboauth.model.SQLRuntimeException;
import net.kyori.adventure.text.Component;
public class ForceUnregisterCommand implements SimpleCommand {
@@ -78,7 +79,7 @@ public class ForceUnregisterCommand implements SimpleCommand {
source.sendMessage(serializer.deserialize(MessageFormat.format(this.successful, playerNick)));
} catch (SQLException e) {
source.sendMessage(serializer.deserialize(MessageFormat.format(this.notSuccessful, playerNick)));
- e.printStackTrace();
+ throw new SQLRuntimeException(e);
}
} else {
source.sendMessage(this.usage);