#495 Create ConsoleLogger method dedicated to logging exceptions
This commit is contained in:
@@ -77,7 +77,7 @@ public abstract class CustomConfiguration extends YamlConfiguration {
|
||||
return true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ConsoleLogger.writeStackTrace("Failed to load config from JAR", e);
|
||||
ConsoleLogger.logException("Failed to load config from JAR", e);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -313,7 +313,7 @@ public final class Settings {
|
||||
try {
|
||||
return Files.toString(EMAIL_FILE, Charsets.UTF_8);
|
||||
} catch (IOException e) {
|
||||
ConsoleLogger.writeStackTrace("Error loading email text: " + StringUtils.formatException(e), e);
|
||||
ConsoleLogger.logException("Error loading email text:", e);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
@@ -748,11 +748,6 @@ public final class Settings {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param path
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private static boolean contains(String path) {
|
||||
return configFile.contains(path);
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ public class NewSetting {
|
||||
writer.flush();
|
||||
writer.close();
|
||||
} catch (IOException e) {
|
||||
ConsoleLogger.writeStackTrace("Could not save config file - " + StringUtils.formatException(e), e);
|
||||
ConsoleLogger.logException("Could not save config file:", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user