[Bleeding] Exception cleanup. Addresses BUKKIT-774
By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
@@ -3,19 +3,17 @@ package org.bukkit.plugin;
|
||||
/**
|
||||
* Thrown when attempting to load an invalid Plugin file
|
||||
*/
|
||||
public class UnknownDependencyException extends Exception {
|
||||
public class UnknownDependencyException extends RuntimeException {
|
||||
|
||||
private static final long serialVersionUID = 5721389371901775894L;
|
||||
private final Throwable cause;
|
||||
private final String message;
|
||||
private static final long serialVersionUID = 5721389371901775895L;
|
||||
|
||||
/**
|
||||
* Constructs a new UnknownDependencyException based on the given Exception
|
||||
*
|
||||
* @param throwable Exception that triggered this Exception
|
||||
*/
|
||||
public UnknownDependencyException(Throwable throwable) {
|
||||
this(throwable, "Unknown dependency");
|
||||
public UnknownDependencyException(final Throwable throwable) {
|
||||
super(throwable);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -24,7 +22,7 @@ public class UnknownDependencyException extends Exception {
|
||||
* @param message Brief message explaining the cause of the exception
|
||||
*/
|
||||
public UnknownDependencyException(final String message) {
|
||||
this(null, message);
|
||||
super(message);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,29 +32,13 @@ public class UnknownDependencyException extends Exception {
|
||||
* @param throwable Exception that triggered this Exception
|
||||
*/
|
||||
public UnknownDependencyException(final Throwable throwable, final String message) {
|
||||
this.cause = null;
|
||||
this.message = message;
|
||||
super(message, throwable);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new UnknownDependencyException
|
||||
*/
|
||||
public UnknownDependencyException() {
|
||||
this(null, "Unknown dependency");
|
||||
}
|
||||
|
||||
/**
|
||||
* If applicable, returns the Exception that triggered this Exception
|
||||
*
|
||||
* @return Inner exception, or null if one does not exist
|
||||
*/
|
||||
@Override
|
||||
public Throwable getCause() {
|
||||
return cause;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user