summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2012-04-20 22:31:25 +0100
committerKHobbits <rob@khobbits.co.uk>2012-04-20 22:31:25 +0100
commit3cc1a462f502e6789e5871130d0d2566b3e99de5 (patch)
tree141d763444ff50225f9c5f427db2bf4516dc542d
parent8da3b490d912f63737425cd1e191a9e09f88ebc0 (diff)
downloadEssentials-3cc1a462f502e6789e5871130d0d2566b3e99de5.tar
Essentials-3cc1a462f502e6789e5871130d0d2566b3e99de5.tar.gz
Essentials-3cc1a462f502e6789e5871130d0d2566b3e99de5.tar.lz
Essentials-3cc1a462f502e6789e5871130d0d2566b3e99de5.tar.xz
Essentials-3cc1a462f502e6789e5871130d0d2566b3e99de5.zip
Remove stack trace cleaning, didn't actually remove unwanted elements.
-rw-r--r--Essentials/src/com/earth2me/essentials/Essentials.java18
1 files changed, 3 insertions, 15 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java
index 5a82a9fb1..6197f5edd 100644
--- a/Essentials/src/com/earth2me/essentials/Essentials.java
+++ b/Essentials/src/com/earth2me/essentials/Essentials.java
@@ -42,6 +42,7 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Server;
import org.bukkit.World;
@@ -241,7 +242,7 @@ public class Essentials extends JavaPlugin implements IEssentials
getScheduler().scheduleSyncRepeatingTask(this, timer, 1, 100);
Economy.setEss(this);
execTimer.mark("RegListeners");
-
+
final MetricsStarter metricsStarter = new MetricsStarter(this);
if (metricsStarter.getStart() != null && metricsStarter.getStart() == true)
{
@@ -304,20 +305,7 @@ public class Essentials extends JavaPlugin implements IEssentials
}
catch (final Exception ex)
{
- final ArrayList<StackTraceElement> elements = new ArrayList<StackTraceElement>(Arrays.asList(ex.getStackTrace()));
- elements.remove(0);
- final ArrayList<StackTraceElement> toRemove = new ArrayList<StackTraceElement>();
- for (final StackTraceElement e : elements)
- {
- if (e.getClassName().equals("com.earth2me.essentials.Essentials"))
- {
- toRemove.add(e);
- }
- }
- elements.removeAll(toRemove);
- final StackTraceElement[] trace = elements.toArray(new StackTraceElement[elements.size()]);
- ex.setStackTrace(trace);
- ex.printStackTrace();
+ Bukkit.getLogger().log(Level.SEVERE, ex.getMessage(), ex);
sender.sendMessage(ChatColor.RED + "An internal error occurred while attempting to perform this command");
return true;
}