aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-08-21 21:31:57 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-08-21 21:31:57 -0400
commit5ce115ec110582b34dfb409928bd74a1fa7f2904 (patch)
tree66b345e1381f88e1b0028e17f8231b2244e80d83
parentaf89d285c30b1f568a4d0e814c9e24b27515f934 (diff)
Fix error message when there are no dyadic cases
-rw-r--r--docs/bqn.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/bqn.js b/docs/bqn.js
index c9d55bdd..650bf225 100644
--- a/docs/bqn.js
+++ b/docs/bqn.js
@@ -145,8 +145,8 @@ let run = (B,O,F,S,L,T,src,env) => { // Bytecode, Objects, Blocks, Bodies, Locat
vid.push(v);
return "do {"+c+"} while (0);\n"
}
- let [mon,dy] = ind.map(js => {
- let e = js.length?"No matching case":"Left argument required";
+ let [mon,dy] = ind.map((js,i) => {
+ let e = js.length?"No matching case":"Left argument "+(i?"not allowed":"required");
return js.map(g).concat(["throw Error('"+e+"');\n"]).join("");
});
def = "new Array("+sp+").fill(null)";