#495 Create ConsoleLogger method dedicated to logging exceptions

This commit is contained in:
ljacqu
2016-02-05 23:09:07 +01:00
parent 558cbf5848
commit c28a1b537f
14 changed files with 78 additions and 71 deletions
@@ -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);
}
}