summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/test
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-28 19:18:20 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-28 19:18:20 +0200
commit225420a08a859ac1849dd7ea680d5c214453824e (patch)
tree8ca5afce32314b1a055b082ccd0a5ca0a77142d7 /src/main/java/at/hannibal2/skyhanni/test
parent7eb3e77e5ce50989af3cd4ab2b196fb0df76e168 (diff)
downloadskyhanni-225420a08a859ac1849dd7ea680d5c214453824e.tar.gz
skyhanni-225420a08a859ac1849dd7ea680d5c214453824e.tar.bz2
skyhanni-225420a08a859ac1849dd7ea680d5c214453824e.zip
code cleanup and better error handling
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/test')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/command/CopyErrorCommand.kt7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/CopyErrorCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/CopyErrorCommand.kt
index 69288a896..946255996 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/command/CopyErrorCommand.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/command/CopyErrorCommand.kt
@@ -16,10 +16,15 @@ object CopyErrorCommand {
private var cache =
CacheBuilder.newBuilder().expireAfterWrite(10, TimeUnit.MINUTES).build<Pair<String, Int>, Unit>()
+ fun skyHanniError(message: String): Nothing {
+ val exception = IllegalStateException(message)
+ logError(exception, message)
+ throw exception
+ }
+
fun command(array: Array<String>) {
if (array.size != 1) {
LorenzUtils.chat("§cUse /shcopyerror <error id>")
-
return
}