From 1cfd7727b58edd0d9187c27e632f25f58b6c7e5c Mon Sep 17 00:00:00 2001 From: Fallen_Breath Date: Sun, 16 Jul 2023 19:08:21 +0800 Subject: [PATCH] optimized `UpdateSuppressionException#toString` --- .../java/carpet/helpers/UpdateSuppressionException.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/main/java/carpet/helpers/UpdateSuppressionException.java b/src/main/java/carpet/helpers/UpdateSuppressionException.java index cc4ace8a..b442fac0 100644 --- a/src/main/java/carpet/helpers/UpdateSuppressionException.java +++ b/src/main/java/carpet/helpers/UpdateSuppressionException.java @@ -41,13 +41,7 @@ public ITextComponent getMessageText() @Override public String getMessage() { - return this.getMessageText().getString(); - } - - @Override - public String toString() - { - return this.getMessage(); + return String.format("%s (%s)", this.getMessageText().getString(), this.getCause().getClass().getSimpleName()); } public static void noop()