diff options
author | Petr Ilin <hevav@hevav.dev> | 2023-01-02 23:48:06 +0300 |
---|---|---|
committer | Petr Ilin <hevav@hevav.dev> | 2023-01-02 23:48:06 +0300 |
commit | ade67d8df404f1e3f264dcd90f815722f719a1cd (patch) | |
tree | 55aae66df5ee70d708fc96f5df593ea98d96a0a0 /src/main/java/net/elytrium/limboauth/command/UnregisterCommand.java | |
parent | 711a554a773184610b183405276ccc516907d872 (diff) | |
download | LimboAuth-ade67d8df404f1e3f264dcd90f815722f719a1cd.tar.gz LimboAuth-ade67d8df404f1e3f264dcd90f815722f719a1cd.tar.bz2 LimboAuth-ade67d8df404f1e3f264dcd90f815722f719a1cd.zip |
Correctly use Exceptions
Diffstat (limited to 'src/main/java/net/elytrium/limboauth/command/UnregisterCommand.java')
-rw-r--r-- | src/main/java/net/elytrium/limboauth/command/UnregisterCommand.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/net/elytrium/limboauth/command/UnregisterCommand.java b/src/main/java/net/elytrium/limboauth/command/UnregisterCommand.java index 69edc8c..53fe58e 100644 --- a/src/main/java/net/elytrium/limboauth/command/UnregisterCommand.java +++ b/src/main/java/net/elytrium/limboauth/command/UnregisterCommand.java @@ -30,6 +30,7 @@ import net.elytrium.limboauth.Settings; import net.elytrium.limboauth.event.AuthUnregisterEvent; import net.elytrium.limboauth.handler.AuthSessionHandler; import net.elytrium.limboauth.model.RegisteredPlayer; +import net.elytrium.limboauth.model.SQLRuntimeException; import net.kyori.adventure.text.Component; public class UnregisterCommand implements SimpleCommand { @@ -83,7 +84,7 @@ public class UnregisterCommand implements SimpleCommand { ((Player) source).disconnect(this.successful); } catch (SQLException e) { source.sendMessage(this.errorOccurred); - e.printStackTrace(); + throw new SQLRuntimeException(e); } } else { source.sendMessage(this.wrongPassword); |