Adds try/catch block for bad views at loading time; bump version to 4.5
This commit is contained in:
parent
84a7c67156
commit
d30bdb8017
|
@ -1,4 +1,4 @@
|
||||||
(defproject views "0.4.4"
|
(defproject views "0.4.5"
|
||||||
:description "You underestimate the power of the SQL side"
|
:description "You underestimate the power of the SQL side"
|
||||||
|
|
||||||
:url "https://github.com/diligenceengine/views"
|
:url "https://github.com/diligenceengine/views"
|
||||||
|
|
|
@ -21,8 +21,12 @@
|
||||||
the template config map, and the view-map itself.
|
the template config map, and the view-map itself.
|
||||||
and returns a result-set for the new-views with post-fn functions applied to the data."
|
and returns a result-set for the new-views with post-fn functions applied to the data."
|
||||||
[db new-view templates view-map]
|
[db new-view templates view-map]
|
||||||
(->> view-map
|
(try
|
||||||
(view-query db)
|
(->> view-map
|
||||||
(into [])
|
(view-query db)
|
||||||
(post-process-result-set new-view templates)
|
(into [])
|
||||||
(hash-map new-view)))
|
(post-process-result-set new-view templates)
|
||||||
|
(hash-map new-view))
|
||||||
|
(catch Exception e
|
||||||
|
(warn (.getMessage e))
|
||||||
|
(warn "Broken view sig: " (pr-str new-view)))))
|
||||||
|
|
Loading…
Reference in a new issue