summaryrefslogtreecommitdiff
path: root/dice/src/example/java/bjc/dicelang/neodice/DieBoxException.java
diff options
context:
space:
mode:
authorBen Culkin <scorpress@gmail.com>2021-03-13 09:11:12 -0500
committerBen Culkin <scorpress@gmail.com>2021-03-13 09:11:12 -0500
commit7efb7b9e997e0977c8343718cd8b5149805ea57b (patch)
tree869ba045f07a6c5aa8a9c6d388941cc5a4862192 /dice/src/example/java/bjc/dicelang/neodice/DieBoxException.java
parentc7c7503bd4a31e88924514d8e6fd4885fcfac042 (diff)
Add more documentation
Also, changed my mind on the way DiePool and its implementations should be structured. The implementations go in the die pool file as internal classes, because nobody should particularly care the specifics about their die pool, only that it does what it says it should
Diffstat (limited to 'dice/src/example/java/bjc/dicelang/neodice/DieBoxException.java')
-rw-r--r--dice/src/example/java/bjc/dicelang/neodice/DieBoxException.java36
1 files changed, 34 insertions, 2 deletions
diff --git a/dice/src/example/java/bjc/dicelang/neodice/DieBoxException.java b/dice/src/example/java/bjc/dicelang/neodice/DieBoxException.java
index efa3d54..e1de67e 100644
--- a/dice/src/example/java/bjc/dicelang/neodice/DieBoxException.java
+++ b/dice/src/example/java/bjc/dicelang/neodice/DieBoxException.java
@@ -1,28 +1,60 @@
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);
}