From 65dde77f6d604faf4a87ddbff2477ee7629bc07f Mon Sep 17 00:00:00 2001 From: David Cole <40234707+DavidArthurCole@users.noreply.github.com> Date: Thu, 26 Sep 2024 19:40:07 -0400 Subject: Backend: Detekt Fixes Part 1 (#2603) --- src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt index bf0f2ba0a..da4b54942 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt @@ -182,7 +182,7 @@ class ConfigManager { try { run() } catch (e: Throwable) { - e.printStackTrace() + logger.log(e.stackTraceToString()) LorenzUtils.shutdownMinecraft("Config is corrupt inside development environment.") } } else { @@ -194,7 +194,7 @@ class ConfigManager { logger.log("Loaded $fileName from file") } catch (e: Exception) { - e.printStackTrace() + logger.log(e.stackTraceToString()) val backupFile = file.resolveSibling("$fileName-${SimpleTimeMark.now().toMillis()}-backup.json") logger.log("Exception while reading $file. Will load blank $fileName and save backup to $backupFile") logger.log("Exception was $e") @@ -202,7 +202,7 @@ class ConfigManager { file.copyTo(backupFile) } catch (e: Exception) { logger.log("Could not create backup for $fileName file") - e.printStackTrace() + logger.log(e.stackTraceToString()) } } } @@ -239,7 +239,7 @@ class ConfigManager { move(unit, file, reason) } catch (e: IOException) { logger.log("Could not save $fileName file to $file") - e.printStackTrace() + logger.log(e.stackTraceToString()) } } -- cgit