jolt's catch is (catch class binding body*); the binding (3rd element) must be a symbol. Neither the analyzer nor the interpreter validated it, so a non-symbol binding crashed with an internal Janet error (expected integer key for array...) and, in the interpreter, a malformed clause whose body never threw was silently swallowed (returned the try value). Clojure rejects a non-class/non-symbol catch clause; match that with an up-front error in analyze-try and eval-try. Surfaced building the Chez try/throw emit. Regression rows in exceptions-spec (runs x3 modes) plus a unit test asserting the clean message in interpret and compile. jolt-kg6p. |
||
|---|---|---|
| .. | ||
| compile-fallback-test.janet | ||
| config-test.janet | ||
| eval-test.janet | ||
| evaluator-test.janet | ||
| interop-test.janet | ||
| lazy-seq-test.janet | ||
| macro-test.janet | ||
| persistent-map-test.janet | ||
| phm-hamt-test.janet | ||
| reader-test.janet | ||
| seed-overlay-registry-test.janet | ||
| try-catch-validation-test.janet | ||
| types-test.janet | ||