added an error check for parsing the config.edn
This commit is contained in:
parent
97de91ca90
commit
e0d3676196
2 changed files with 21 additions and 18 deletions
|
@ -1,4 +1,4 @@
|
|||
(defproject cryogen-core "0.1.20"
|
||||
(defproject cryogen-core "0.1.21"
|
||||
:description "Cryogen's compiler"
|
||||
:url "https://github.com/lacarmen/cryogen-core"
|
||||
:license {:name "Eclipse Public License"
|
||||
|
|
|
@ -266,6 +266,7 @@
|
|||
(defn read-config
|
||||
"Reads the config file"
|
||||
[]
|
||||
(try
|
||||
(let [config (-> "templates/config.edn"
|
||||
get-resource
|
||||
slurp
|
||||
|
@ -282,7 +283,9 @@
|
|||
config
|
||||
{:page-root (root-path :page-root config)
|
||||
:post-root (root-path :post-root config)
|
||||
:tag-root (root-path :tag-root config)})))
|
||||
:tag-root (root-path :tag-root config)}))
|
||||
(catch Exception _
|
||||
(throw (IllegalArgumentException. "Failed to parse config.edn")))))
|
||||
|
||||
(defn compile-assets
|
||||
"Generates all the html and copies over resources specified in the config"
|
||||
|
|
Loading…
Reference in a new issue