Exception handling in commands

By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
Bukkit/Spigot
2011-02-18 16:25:06 +00:00
parent eb206f49c1
commit 636c1ec83a
4 changed files with 47 additions and 8 deletions

View File

@@ -0,0 +1,27 @@
package org.bukkit.command;
/**
* Thrown when an unhandled exception occurs during the execution of a Command
*/
public class CommandException extends RuntimeException {
/**
* Creates a new instance of <code>CommandException</code> without detail message.
*/
public CommandException() {
}
/**
* Constructs an instance of <code>CommandException</code> with the specified detail message.
* @param msg the detail message.
*/
public CommandException(String msg) {
super(msg);
}
public CommandException(String msg, Throwable cause) {
super(msg, cause);
}
}