From bd0576d13fb6b801ebd42532599d37d7c0d68709 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Sat, 6 Aug 2022 17:03:57 +0900 Subject: - Better exception messages --- .../dungeonsguide/launcher/exceptions/AuthServerException.java | 7 +++++-- .../launcher/exceptions/NoSuitableLoaderFoundException.java | 7 ++++++- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'loader/src/main/java') diff --git a/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/exceptions/AuthServerException.java b/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/exceptions/AuthServerException.java index 22b851a8..abe47881 100644 --- a/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/exceptions/AuthServerException.java +++ b/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/exceptions/AuthServerException.java @@ -18,10 +18,13 @@ package kr.syeyoung.dungeonsguide.launcher.exceptions; -import lombok.AllArgsConstructor; import org.json.JSONObject; -@AllArgsConstructor public class AuthServerException extends RuntimeException { private JSONObject payload; + + public AuthServerException(JSONObject payload) { + super("Auth server threw: \n"+payload); + this.payload = payload; + } } diff --git a/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/exceptions/NoSuitableLoaderFoundException.java b/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/exceptions/NoSuitableLoaderFoundException.java index e5f50754..c2f9a907 100644 --- a/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/exceptions/NoSuitableLoaderFoundException.java +++ b/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/exceptions/NoSuitableLoaderFoundException.java @@ -20,8 +20,13 @@ package kr.syeyoung.dungeonsguide.launcher.exceptions; import lombok.AllArgsConstructor; -@AllArgsConstructor public class NoSuitableLoaderFoundException extends RuntimeException { private String jvmFlag; private String configuration; + + public NoSuitableLoaderFoundException(String jvmFlag, String configuration) { + super("No suitable loader found: (flag: "+jvmFlag+" / config: "+configuration+")"); + this.jvmFlag = jvmFlag; + this.configuration = configuration; + } } -- cgit