From e7bc8151470c80aa678cf2a7233239f691c3a006 Mon Sep 17 00:00:00 2001 From: Sean Hagstrom Date: Mon, 10 Jun 2024 16:19:56 +0100 Subject: [PATCH] tweak: throw exception when not given a compatible continuation --- src/utils/re_frame.cljs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/re_frame.cljs b/src/utils/re_frame.cljs index fd123fe8256..ded7d3c5930 100644 --- a/src/utils/re_frame.cljs +++ b/src/utils/re_frame.cljs @@ -126,4 +126,7 @@ [continuation & args] (cond (vector? continuation) (dispatch (into continuation args)) - (fn? continuation) (apply continuation args))) + (fn? continuation) (apply continuation args) + :else (throw (ex-info + (str "Unsupported continuation: " (type->str continuation)) + {:hint "Make sure to pass a vector or function"}))))