From 2844af0039436d6bad73977418f32d854ea6eecc Mon Sep 17 00:00:00 2001 From: ementalo Date: Thu, 22 Sep 2011 17:29:00 +0100 Subject: [PATCH] Throw correct exceptions Test #943 --- .../src/com/earth2me/essentials/commands/Commandinvsee.java | 1 + .../src/com/earth2me/essentials/commands/Commandmail.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java b/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java index 8b6dc8182..07710d40a 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java @@ -49,5 +49,6 @@ public class Commandinvsee extends EssentialsCommand user.getInventory().setContents(invUserStack); user.sendMessage(Util.format("invSee", invUser.getDisplayName())); user.sendMessage(Util.i18n("invSeeHelp")); + throw new NoChargeException(); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandmail.java b/Essentials/src/com/earth2me/essentials/commands/Commandmail.java index a98fabbd2..e08a6c8e5 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandmail.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandmail.java @@ -64,6 +64,6 @@ public class Commandmail extends EssentialsCommand user.setMails(null); throw new Exception(Util.i18n("mailCleared")); } - throw new NotEnoughArgumentsException(); + throw new NoChargeException(); } }