From 6f74f80336af10a7ab1871a62565ceaae89638d9 Mon Sep 17 00:00:00 2001 From: brenoepic <59066707+brenoepics@users.noreply.github.com> Date: Fri, 29 Apr 2022 16:54:20 -0300 Subject: [PATCH] printStackTrace to LOGGER --- .../java/com/eu/habbo/messages/rcon/ChangeUsername.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/eu/habbo/messages/rcon/ChangeUsername.java b/src/main/java/com/eu/habbo/messages/rcon/ChangeUsername.java index 848d6d25..24dd7a11 100644 --- a/src/main/java/com/eu/habbo/messages/rcon/ChangeUsername.java +++ b/src/main/java/com/eu/habbo/messages/rcon/ChangeUsername.java @@ -44,10 +44,12 @@ public class ChangeUsername extends RCONMessage { success = statement.executeUpdate() >= 1; } catch (SQLException sqlException) { - sqlException.printStackTrace(); + this.message = "SQL Exception occurred"; + LOGGER.error(this.message, sqlException); } } catch (SQLException sqlException) { - sqlException.printStackTrace(); + this.message = "SQL Exception occurred"; + LOGGER.error(this.message, sqlException); } } @@ -57,7 +59,7 @@ public class ChangeUsername extends RCONMessage { catch (Exception e) { this.status = RCONMessage.SYSTEM_ERROR; this.message = "Exception occurred"; - LOGGER.error("Exception occurred", e); + LOGGER.error(this.message, e); } }