Merge pull request #41 from DomainDrivenArchitecture/make_include_more_fault_tolerant

make include error handling more user friendly
This commit is contained in:
Simon Brooke 2020-02-05 23:47:45 +00:00 committed by GitHub
commit 2496ea8f4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,7 +19,11 @@ smeagol.include and not inteded for direct usage."
(cond exists? (cond exists?
(do (do
(timbre/info (format "Including page '%s' from file '%s'" uri file-path)) (timbre/info (format "Including page '%s' from file '%s'" uri file-path))
(slurp file-path))))) (slurp file-path))
:else
(do
(timbre/info (format "Page '%s' not found at '%s'" uri file-path))
(str "include not found at " file-path)))))
(s/defn (s/defn
new-resolver new-resolver