diff options
| author | Ben Culkin <scorpress@gmail.com> | 2020-11-21 16:51:04 -0500 |
|---|---|---|
| committer | Ben Culkin <scorpress@gmail.com> | 2020-11-21 16:51:04 -0500 |
| commit | 4c0f972c4616eb549a098c3ef40d527eb542d7a6 (patch) | |
| tree | f791838e7477bb15fe2181bf673231e2e4ccda0a /base/src/main/java/bjc/utils/patterns/NonExhaustiveMatch.java | |
| parent | aaf35ffcea677d315aa24180f2742a45e2146ece (diff) | |
Add basic pattern matching
Adds a basic pattern matching implementation. Not perfect, but pretty
good, considering what we have to work with
Diffstat (limited to 'base/src/main/java/bjc/utils/patterns/NonExhaustiveMatch.java')
| -rw-r--r-- | base/src/main/java/bjc/utils/patterns/NonExhaustiveMatch.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/base/src/main/java/bjc/utils/patterns/NonExhaustiveMatch.java b/base/src/main/java/bjc/utils/patterns/NonExhaustiveMatch.java new file mode 100644 index 0000000..aaa7e89 --- /dev/null +++ b/base/src/main/java/bjc/utils/patterns/NonExhaustiveMatch.java @@ -0,0 +1,20 @@ +package bjc.utils.patterns; + +/** + * Exception thrown when a non-exhaustive match happens. + * @author Ben Culkin + * + */ +public class NonExhaustiveMatch extends Exception { + private static final long serialVersionUID = 3892904574888418544L; + + /** + * Create a new non-exhaustive match. + * + * @param message The message for the exception. + */ + public NonExhaustiveMatch(String message) { + super(message); + } + +} |
