From 2a448b2839d43826190e7feb0003317f95f4c201 Mon Sep 17 00:00:00 2001 From: gered Date: Sun, 23 Mar 2014 10:07:00 -0400 Subject: [PATCH] should be throwing exceptions if resource files not found by default get-resource-path returns nil if the filename doesnt specify a file which isn't in the classpath --- src/clj_jtwig/core.clj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/clj_jtwig/core.clj b/src/clj_jtwig/core.clj index da17e95..aa7ee1f 100644 --- a/src/clj_jtwig/core.clj +++ b/src/clj_jtwig/core.clj @@ -168,4 +168,5 @@ the template." [^String filename model-map & [options]] (if-let [resource-filename (get-resource-path filename)] - (render-file (.getPath resource-filename) model-map options))) + (render-file (.getPath resource-filename) model-map options) + (throw (new FileNotFoundException (str "Template file \"" filename "\" not found.")))))