Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
1package org.bukkit.plugin;
2
3/**
4 * Thrown when attempting to load an invalid Plugin file
5 */
6public class InvalidPluginException extends Exception {
7 private static final long serialVersionUID = -8242141640709409542L;
8 private final Throwable cause;
9
10 /**
11 * Constructs a new InvalidPluginException based on the given Exception
12 *
13 * @param throwable Exception that triggered this Exception
14 */
15 public InvalidPluginException(Throwable throwable) {
16 cause = throwable;
17 }
18
19 /**
20 * Constructs a new InvalidPluginException
21 */
22 public InvalidPluginException() {
23 cause = null;
24 }
25
26 /**
27 * If applicable, returns the Exception that triggered this Exception
28 *
29 * @return Inner exception, or null if one does not exist
30 */
31 @Override
32 public Throwable getCause() {
33 return cause;
34 }
35}