Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
EventException.java
1 package org.bukkit.event;
2 
3 public class EventException extends Exception {
4  private static final long serialVersionUID = 3532808232324183999L;
5  private final Throwable cause;
6 
7  /**
8  * Constructs a new EventException based on the given Exception
9  *
10  * @param throwable Exception that triggered this Exception
11  */
12  public EventException(Throwable throwable) {
13  cause = throwable;
14  }
15 
16  /**
17  * Constructs a new EventException
18  */
19  public EventException() {
20  cause = null;
21  }
22 
23  /**
24  * Constructs a new EventException with the given message
25  *
26  * @param cause The exception that caused this
27  * @param message The message
28  */
29  public EventException(Throwable cause, String message) {
30  super(message);
31  this.cause = cause;
32  }
33 
34  /**
35  * Constructs a new EventException with the given message
36  *
37  * @param message The message
38  */
39  public EventException(String message) {
40  super(message);
41  cause = null;
42  }
43 
44  /**
45  * If applicable, returns the Exception that triggered this Exception
46  *
47  * @return Inner exception, or null if one does not exist
48  */
49  @Override
50  public Throwable getCause() {
51  return cause;
52  }
53 }
EventException(Throwable cause, String message)
EventException(Throwable throwable)