From 7efb7b9e997e0977c8343718cd8b5149805ea57b Mon Sep 17 00:00:00 2001 From: Ben Culkin Date: Sat, 13 Mar 2021 09:11:12 -0500 Subject: 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 --- .../java/bjc/dicelang/neodice/DieBoxException.java | 36 ++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) (limited to 'dice/src/example/java/bjc/dicelang/neodice/DieBoxException.java') 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); } -- cgit v1.2.3