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"
|
:description "Cryogen's compiler"
|
||||||
:url "https://github.com/lacarmen/cryogen-core"
|
:url "https://github.com/lacarmen/cryogen-core"
|
||||||
:license {:name "Eclipse Public License"
|
:license {:name "Eclipse Public License"
|
||||||
|
|
|
@ -266,6 +266,7 @@
|
||||||
(defn read-config
|
(defn read-config
|
||||||
"Reads the config file"
|
"Reads the config file"
|
||||||
[]
|
[]
|
||||||
|
(try
|
||||||
(let [config (-> "templates/config.edn"
|
(let [config (-> "templates/config.edn"
|
||||||
get-resource
|
get-resource
|
||||||
slurp
|
slurp
|
||||||
|
@ -282,7 +283,9 @@
|
||||||
config
|
config
|
||||||
{:page-root (root-path :page-root config)
|
{:page-root (root-path :page-root config)
|
||||||
:post-root (root-path :post-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
|
(defn compile-assets
|
||||||
"Generates all the html and copies over resources specified in the config"
|
"Generates all the html and copies over resources specified in the config"
|
||||||
|
|
Loading…
Reference in a new issue