Browse code

Add catch-all clause to ensure user sees something even on error

Joseph Weston authored on 24/10/2022 00:03:09
Showing 1 changed files
... ...
@@ -390,7 +390,8 @@
390 390
       (is-spell-list? x) [spell-list-panel x]
391 391
       (is-spell? x) (spell-panel x)
392 392
       (is-equipment? x) [equipment-panel x]
393
-      (is-error? x) [error-message x])])
393
+      (is-error? x) [error-message x]
394
+      :else [error-message {:err (str "cannot display result: " x)}])])
394 395
 
395 396
 (defn history []
396 397
   (let [history (re-frame/subscribe [::subs/cmd-history])]