mirror of
https://github.com/taoensso/telemere.git
synced 2026-01-08 17:59:51 +00:00
[new] Throw compile-time error on signals with both run and error forms
This commit is contained in:
parent
0f0e049993
commit
d9517143a8
1 changed files with 8 additions and 0 deletions
|
|
@ -553,6 +553,14 @@
|
|||
:ctx :parent #_:trace?, :do :let :data :msg :error :run
|
||||
:elide? :allow? #_:expansion-id))]
|
||||
|
||||
(when (and run-form error-form)
|
||||
(throw ; Prevent ambiguity re: source of error
|
||||
(ex-info "Signals cannot have both `:run` and `:error` opts at the same time"
|
||||
{:run-form run-form
|
||||
:error-form error-form
|
||||
:location location
|
||||
:other-opts (dissoc opts :run :error)})))
|
||||
|
||||
;; Eval let bindings AFTER call filtering but BEFORE data, msg
|
||||
`(do
|
||||
~do-form
|
||||
|
|
|
|||
Loading…
Reference in a new issue