summaryrefslogtreecommitdiff
path: root/dice/src/example/java/bjc/dicelang/neodice/DieBoxException.java
blob: e1de67e2261c767f3915dec8960fffb4f4e06912 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package bjc.dicelang.neodice;

/**
 * The exception thrown when something goes wrong with diebox.
 * @author Ben Culkin
 *
 */
public class DieBoxException extends RuntimeException {
	private static final long serialVersionUID = 1851356458656622896L;

	/** Create a new exception */
	public DieBoxException() {
		super();
	}
	
	/**
	 * Create a new exception with a given message.
	 * 
	 * @param message The message for the exception.
	 */
	public DieBoxException(String message) {
		super(message);
	}
	
	/**
	 * Create a new exception with a given formatted message.
	 * 
	 * @param format The format string.
	 * @param args The format arguments.
	 */
	public DieBoxException(String format, Object... args) {
		super(String.format(format, args));
	}
	
	/**
	 * Create a new diebox exception with a cause.
	 * @param cause The cause of this exception.
	 */
	public DieBoxException(Throwable cause) {
		super(cause);
	}

    /**
     * Create a new diebox exception with a cause and message.
     * @param cause The cause of this exception.
     * @param message The message for the exception.
     */
	public DieBoxException(Throwable cause, String message) {
		super(message, cause);
	}

    /**
     * Create a new diebox exception with a cause and formatted message.
     * @param cause The cause of this exception.
     * @param format The format string.
     * @param args The format arguments.
     */
	public DieBoxException(Throwable cause, String format, Object... args) {
		super(String.format(format, args), cause);
	}
}