From a3d2728f84375566da3da560b3faad018d34005d Mon Sep 17 00:00:00 2001 From: Ben Culkin Date: Fri, 16 Sep 2022 18:58:48 -0400 Subject: Cleanup --- .../main/java/bjc/utils/ioutils/DuplicateKeys.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 base/src/main/java/bjc/utils/ioutils/DuplicateKeys.java (limited to 'base/src/main/java/bjc/utils/ioutils/DuplicateKeys.java') diff --git a/base/src/main/java/bjc/utils/ioutils/DuplicateKeys.java b/base/src/main/java/bjc/utils/ioutils/DuplicateKeys.java new file mode 100644 index 0000000..604cc69 --- /dev/null +++ b/base/src/main/java/bjc/utils/ioutils/DuplicateKeys.java @@ -0,0 +1,21 @@ +package bjc.utils.ioutils; + +/** + * Exception thrown when there is a duplicate key, when they are forbidden. + * + * @author 15405 + * + */ +public class DuplicateKeys extends RuntimeException { + private static final long serialVersionUID = -5521190136366024804L; + + /** + * Create a new duplicate key exception. + * + * @param keyName + * The name of the key that has been duplicated. + */ + public DuplicateKeys(String keyName) { + super(String.format("Duplicate value encountered for key '%s'", keyName)); + } +} \ No newline at end of file -- cgit v1.2.3