summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2013-11-24 23:48:04 +0000
committerKHobbits <rob@khobbits.co.uk>2013-12-05 23:03:31 +0000
commit4232216f766e5062f7f55e452c117a38a385805a (patch)
tree404c36d79d09c27c81d9f5487c516be2a06f2d47
parentbeef371ae658c248e51b85128f17f659c46ec7de (diff)
downloadEssentials-4232216f766e5062f7f55e452c117a38a385805a.tar
Essentials-4232216f766e5062f7f55e452c117a38a385805a.tar.gz
Essentials-4232216f766e5062f7f55e452c117a38a385805a.tar.lz
Essentials-4232216f766e5062f7f55e452c117a38a385805a.tar.xz
Essentials-4232216f766e5062f7f55e452c117a38a385805a.zip
Try to be a little less confusing with non-command debug errors.
-rw-r--r--Essentials/src/com/earth2me/essentials/TimedTeleport.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java27
-rw-r--r--EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java2
3 files changed, 18 insertions, 13 deletions
diff --git a/Essentials/src/com/earth2me/essentials/TimedTeleport.java b/Essentials/src/com/earth2me/essentials/TimedTeleport.java
index 549b9f9bf..cf1a2497b 100644
--- a/Essentials/src/com/earth2me/essentials/TimedTeleport.java
+++ b/Essentials/src/com/earth2me/essentials/TimedTeleport.java
@@ -114,7 +114,7 @@ public class TimedTeleport implements Runnable
}
catch (Exception ex)
{
- ess.showError(teleportOwner.getSource(), ex, "teleport");
+ ess.showError(teleportOwner.getSource(), ex, "\\ teleport");
}
}
catch (Exception ex)
diff --git a/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java b/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java
index 482b66fcb..3c419fd2d 100644
--- a/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java
+++ b/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java
@@ -51,11 +51,11 @@ public class EssentialsSign
}
catch (ChargeException ex)
{
- ess.showError(user.getSource(), ex, signName);
+ showError(ess, user.getSource(), ex, signName);
}
catch (SignException ex)
{
- ess.showError(user.getSource(), ex, signName);
+ showError(ess, user.getSource(), ex, signName);
}
// Return true, so the player sees the wrong sign.
return true;
@@ -97,12 +97,12 @@ public class EssentialsSign
}
catch (ChargeException ex)
{
- ess.showError(user.getSource(), ex, signName);
+ showError(ess, user.getSource(), ex, signName);
return false;
}
catch (SignException ex)
{
- ess.showError(user.getSource(), ex, signName);
+ showError(ess, user.getSource(), ex, signName);
return false;
}
}
@@ -119,7 +119,7 @@ public class EssentialsSign
}
catch (SignException ex)
{
- ess.showError(user.getSource(), ex, signName);
+ showError(ess, user.getSource(), ex, signName);
return false;
}
}
@@ -148,11 +148,11 @@ public class EssentialsSign
}
catch (ChargeException ex)
{
- ess.showError(user.getSource(), ex, signName);
+ showError(ess, user.getSource(), ex, signName);
}
catch (SignException ex)
{
- ess.showError(user.getSource(), ex, signName);
+ showError(ess, user.getSource(), ex, signName);
}
return false;
}
@@ -166,11 +166,11 @@ public class EssentialsSign
}
catch (ChargeException ex)
{
- ess.showError(user.getSource(), ex, signName);
+ showError(ess, user.getSource(), ex, signName);
}
catch (SignException ex)
{
- ess.showError(user.getSource(), ex, signName);
+ showError(ess, user.getSource(), ex, signName);
}
return false;
}
@@ -184,7 +184,7 @@ public class EssentialsSign
}
catch (SignException ex)
{
- ess.showError(user.getSource(), ex, signName);
+ showError(ess, user.getSource(), ex, signName);
}
return false;
}
@@ -457,7 +457,12 @@ public class EssentialsSign
return new Trade(money, ess);
}
}
-
+
+
+ private void showError(final IEssentials ess, final CommandSource sender, final Throwable exception, final String signName)
+ {
+ ess.showError(sender, exception, "\\ sign: " + signName);
+ }
static class EventSign implements ISign
{
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java
index 9554c63f6..0a1be2222 100644
--- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java
+++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java
@@ -82,7 +82,7 @@ public abstract class EssentialsChatPlayer implements Listener
}
catch (ChargeException e)
{
- ess.showError(chatStore.getUser().getSource(), e, chatStore.getLongType());
+ ess.showError(chatStore.getUser().getSource(), e, "\\ chat " + chatStore.getLongType());
event.setCancelled(true);
return false;
}