From 5d7abb4a7b2eb8a86c7314ae1f2e54d79ff4fcf2 Mon Sep 17 00:00:00 2001 From: Jack Lin Date: Mon, 1 Jun 2015 21:09:55 +1200 Subject: [PATCH] Remove logError method introduced in 7891e84 --- .../ProjectKorra/GeneralMethods.java | 54 +------------------ 1 file changed, 1 insertion(+), 53 deletions(-) diff --git a/src/com/projectkorra/ProjectKorra/GeneralMethods.java b/src/com/projectkorra/ProjectKorra/GeneralMethods.java index 4c70d481..6e18d5f3 100644 --- a/src/com/projectkorra/ProjectKorra/GeneralMethods.java +++ b/src/com/projectkorra/ProjectKorra/GeneralMethods.java @@ -1852,58 +1852,6 @@ public class GeneralMethods { return false; } - /** - * Logs a throwable into an ERROR.log file in the ProjectKorra root folder. - *

- * Calls {@link #logError(Throwable, boolean)} with silent set to true - *

- * - * @param e The throwable/exception to log - */ - public static void logError(Throwable e) { - logError(e, true); - } - - /** - * Logs a throwable into an ERROR.log file in the ProjectKorra root folder. - *

- * If silent is {@code true} this method will display - * will display an error in console indicating admins to check ERROR.log - *
- * Otherwise it will log the error silently - *

- * - * @param e The throwable/exception to log - * @param silent Wether or not the console should be notified of an error - */ - public static void logError(Throwable e, boolean silent) { - File errorFile = new File(plugin.getDataFolder(), "ERROR.log"); - if (!errorFile.exists()) { - try { - errorFile.createNewFile(); - } catch (IOException ex) { - ProjectKorra.log.severe("Unable to generate error log!"); - ex.printStackTrace(); - } - } else { - try(PrintWriter out = new PrintWriter(new FileWriter(errorFile, true))) { - if (!silent) { - ProjectKorra.log.severe("###################################################"); - ProjectKorra.log.severe("##################====[ERROR]====##################"); - ProjectKorra.log.severe(" An error has been caught"); - ProjectKorra.log.severe(" Please check the ERROR.log file for stack trace."); - ProjectKorra.log.severe(" Create a bug report with the log contents at."); - ProjectKorra.log.severe("http://projectkorra.com/forum/forums/bug-reports.6/"); - ProjectKorra.log.severe("##################====[ERROR]====##################"); - ProjectKorra.log.severe("###################################################"); - } - e.printStackTrace(out); - } catch (IOException ex) { - ex.printStackTrace(); - } - } - } - /** * Returns a location with a specified distance away from the left side of a location. * @param location @@ -1944,4 +1892,4 @@ public class GeneralMethods { return Element.Chi; return null; } -} \ No newline at end of file +}