Remove spaces from console logs

Continues on from #200
This commit is contained in:
Daniel Compton 2018-01-17 15:36:13 +13:00
parent 64f858c4e3
commit 2db1dbaad2
8 changed files with 16 additions and 16 deletions

View File

@ -85,7 +85,7 @@
[context]
(if-let [handler (get-handler kind id)]
(update context :coeffects handler)
(console :error "No cofx handler registered for \"" id "\"")))))
(console :error "No cofx handler registered for" id)))))
([id value]
(->interceptor
:id :coeffects
@ -93,7 +93,7 @@
[context]
(if-let [handler (get-handler kind id)]
(update context :coeffects handler value)
(console :error "No cofx handler registered for \"" id "\""))))))
(console :error "No cofx handler registered for" id))))))
;; -- Builtin CoEffects Handlers ---------------------------------------------

View File

@ -56,7 +56,7 @@
(let [event-id (first-in-vector event-v)]
(if-let [interceptors (get-handler kind event-id true)]
(if *handling*
(console :error "re-frame: while handling \"" *handling* "\", dispatch-sync was called for \"" event-v "\". You can't call dispatch-sync within an event handler.")
(console :error "re-frame: while handling" *handling* ", dispatch-sync was called for" event-v ". You can't call dispatch-sync within an event handler.")
(binding [*handling* event-v]
(trace/with-trace {:operation event-id
:op-type kind

View File

@ -71,7 +71,7 @@
(doseq [[effect-key effect-value] (:effects context)]
(if-let [effect-fn (get-handler kind effect-key false)]
(effect-fn effect-value)
(console :error "re-frame: no handler registered for effect: \"" effect-key "\". Ignoring."))))))
(console :error "re-frame: no handler registered for effect:" effect-key ". Ignoring."))))))
;; -- Builtin Effect Handlers ------------------------------------------------

View File

@ -129,7 +129,7 @@
(trace/merge-trace! {:tags {:cached? false}})
(if (nil? handler-fn)
(do (trace/merge-trace! {:error true})
(console :error (str "re-frame: no subscription handler registered for: \"" query-id "\". Returning a nil subscription.")))
(console :error (str "re-frame: no subscription handler registered for:" query-id ". Returning a nil subscription.")))
(cache-and-return query [] (handler-fn app-db query)))))))
([query dynv]
@ -150,7 +150,7 @@
(console :warn "re-frame: your subscription's dynamic parameters that don't implement IReactiveAtom:" not-reactive)))
(if (nil? handler-fn)
(do (trace/merge-trace! {:error true})
(console :error (str "re-frame: no subscription handler registered for: \"" query-id "\". Returning a nil subscription.")))
(console :error (str "re-frame: no subscription handler registered for:" query-id ". Returning a nil subscription.")))
(let [dyn-vals (make-reaction (fn [] (mapv deref dynv)))
sub (make-reaction (fn [] (handler-fn app-db query @dyn-vals)))]
;; handler-fn returns a reaction which is then wrapped in the sub reaction

View File

@ -58,7 +58,7 @@
(try
(log/set-loggers! {:error log-fn})
(re-frame/dispatch-sync [::missing-handler-test])
(is (re-matches #"re-frame: no handler registered for effect: \":fx-not-exist\". Ignoring." (first @logs)))
(is (re-matches #"re-frame: no handler registered for effect::fx-not-exist. Ignoring." (first @logs)))
(is (= (count @logs) 1))
(finally
(log/set-loggers! original-loggers)))))