1
0
mirror of https://e.coding.net/circlecloud/YumCore.git synced 2024-11-21 01:38:51 +00:00

fix: 命令异常直接抛出

Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
502647092 2017-02-04 20:38:26 +08:00
parent 8b90dce242
commit 644f661001
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,7 @@
package pw.yumc.YumCore.commands;
import org.bukkit.command.CommandSender;
import pw.yumc.YumCore.bukkit.Log;
import pw.yumc.YumCore.commands.exception.ArgumentException;
import pw.yumc.YumCore.commands.exception.CommandException;
@ -10,6 +11,8 @@ import pw.yumc.YumCore.commands.info.CommandInfo;
import pw.yumc.YumCore.commands.interfaces.ErrorHanlder;
/**
* 命令错误处理
*
* @author
* @since 2016/11/27 0027
*/

View File

@ -19,7 +19,6 @@ import pw.yumc.YumCore.commands.annotation.Cmd.Executor;
import pw.yumc.YumCore.commands.annotation.Help;
import pw.yumc.YumCore.commands.annotation.Sort;
import pw.yumc.YumCore.commands.exception.ArgumentException;
import pw.yumc.YumCore.commands.exception.CommandException;
import pw.yumc.YumCore.commands.exception.ParseException;
import pw.yumc.YumCore.commands.exception.PermissionException;
import pw.yumc.YumCore.commands.exception.SenderException;
@ -133,7 +132,7 @@ public class CommandInfo {
} catch (ParseException | ArgumentException e) {
Log.sender(sender, argErr, e.getMessage());
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
throw new CommandException(e);
throw new RuntimeException(e);
}
};
if (async) {