summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/bukkit/plugin/InvalidPluginException.java
blob: 4155723abe80a0906f3ddc3028dc2918c4b531fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

package org.bukkit.plugin;

/**
 * Thrown when attempting to load an invalid Plugin file
 */
public class InvalidPluginException extends Exception {
	private static final long serialVersionUID = -8242141640709409542L;
	private final Throwable cause;

    /**
     * Constructs a new InvalidPluginException based on the given Exception
     *
     * @param throwable Exception that triggered this Exception
     */
    public InvalidPluginException(Throwable throwable) {
        cause = throwable;
    }

    /**
     * Constructs a new InvalidPluginException
     */
    public InvalidPluginException() {
        cause = null;
    }

    /**
     * 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;
    }
}