summaryrefslogtreecommitdiff
path: root/base/src/bjc/dicelang/Errors.java
diff options
context:
space:
mode:
authorbjculkin <bjculkin@mix.wvu.edu>2018-03-01 19:13:48 -0500
committerbjculkin <bjculkin@mix.wvu.edu>2018-03-01 19:13:48 -0500
commitf9d9bd4bbf7dd6a297e1daf5ee7b4263d706d9cd (patch)
tree75ade2ca798bcdbdd7daf867480378299598581a /base/src/bjc/dicelang/Errors.java
parentb14a399d05fc90d8532cd08d1546e6bf197db10e (diff)
Update
Diffstat (limited to 'base/src/bjc/dicelang/Errors.java')
-rw-r--r--base/src/bjc/dicelang/Errors.java37
1 files changed, 21 insertions, 16 deletions
diff --git a/base/src/bjc/dicelang/Errors.java b/base/src/bjc/dicelang/Errors.java
index 2577a32..8d3c969 100644
--- a/base/src/bjc/dicelang/Errors.java
+++ b/base/src/bjc/dicelang/Errors.java
@@ -273,15 +273,15 @@ public class Errors {
* Print an error.
*
* @param key
- * The key of the error.
+ * The key of the error.
*
* @param args
- * The arguments for the error.
+ * The arguments for the error.
*/
public void printError(final ErrorKey key, final String... args) {
- switch (mode) {
+ switch(mode) {
case WIZARD:
- if (key == ErrorKey.EK_MISC_NOFILE) {
+ if(key == ErrorKey.EK_MISC_NOFILE) {
System.out.println("\t? 404");
} else {
System.out.println("\t? " + key.ordinal());
@@ -299,7 +299,7 @@ public class Errors {
}
private static void devError(final ErrorKey key, final String[] args) {
- switch (key) {
+ switch(key) {
case EK_DFN_PREDSYN:
System.out.printf("\tERROR: Incorrect define guard syntax %s\n", args[0]);
break;
@@ -309,8 +309,10 @@ public class Errors {
break;
case EK_DFN_RECUR:
- System.out.printf("\tERROR: Recursive define didn't converge after %s iterations."
- + " Original string was %s, last iteration was %s\n", args[0], args[1], args[2]);
+ System.out.printf(
+ "\tERROR: Recursive define didn't converge after %s iterations."
+ + " Original string was %s, last iteration was %s\n",
+ args[0], args[1], args[2]);
break;
case EK_CONS_INVPRAG:
@@ -322,7 +324,8 @@ public class Errors {
break;
case EK_ENG_NOOPENING:
- System.out.printf("\tERROR: Encountered closing doublebrace without" + " matching opening doublebrace\n");
+ System.out.printf("\tERROR: Encountered closing doublebrace without"
+ + " matching opening doublebrace\n");
break;
case EK_ENG_NOCLOSING:
@@ -346,8 +349,8 @@ public class Errors {
break;
case EK_EVAL_INVBIN:
- System.out.printf("\tERROR: Binary operators take 2 operands, not %s\n" + "\tProblem node is %s\n", args[0],
- args[1]);
+ System.out.printf("\tERROR: Binary operators take 2 operands, not %s\n"
+ + "\tProblem node is %s\n", args[0], args[1]);
break;
case EK_EVAL_UNBIN:
@@ -383,7 +386,8 @@ public class Errors {
break;
case EK_EVAL_INVDGROUP:
- System.out.printf("\tERROR: Dice group operator expects scalar dice or integers," + " not %s\n", args[0]);
+ System.out.printf("\tERROR: Dice group operator expects scalar dice or integers," + " not %s\n",
+ args[0]);
break;
case EK_EVAL_INVDICE:
@@ -407,8 +411,8 @@ public class Errors {
break;
case EK_PARSE_UNCLOSE:
- System.out.printf("\tERROR: Found group closer without opener: (closing was %s" + ", expected %s)\n",
- args[0], args[1]);
+ System.out.printf("\tERROR: Found group closer without opener: (closing was %s"
+ + ", expected %s)\n", args[0], args[1]);
break;
case EK_PARSE_BINARY:
@@ -434,12 +438,13 @@ public class Errors {
break;
case EK_SHUNT_NOOP:
- System.out.printf("\tERROR: Unary operator %s is an adverb, but there is no operator" + " to apply it to\n",
- args[0]);
+ System.out.printf("\tERROR: Unary operator %s is an adverb, but there is no operator"
+ + " to apply it to\n", args[0]);
break;
case EK_SHUNT_NOGROUP:
- System.out.printf("\tERROR: Couldn't find matching grouping %s (expected %s)\n", args[0], args[1]);
+ System.out.printf("\tERROR: Couldn't find matching grouping %s (expected %s)\n", args[0],
+ args[1]);
break;
case EK_SHUNT_NOTASSOC: