[#587] Avoid NPE in error handling
This commit is contained in:
parent
e531300bae
commit
1efd3e6d3d
2 changed files with 2 additions and 2 deletions
2
deps.edn
2
deps.edn
|
|
@ -1,7 +1,7 @@
|
||||||
{:paths ["src" "feature-xml" "feature-core-async"
|
{:paths ["src" "feature-xml" "feature-core-async"
|
||||||
"feature-yaml" "feature-csv" "feature-transit"
|
"feature-yaml" "feature-csv" "feature-transit"
|
||||||
"feature-java-time" "feature-java-nio"
|
"feature-java-time" "feature-java-nio"
|
||||||
"feature-httpkit-client"
|
"feature-httpkit-client" "feature-httpkit-server"
|
||||||
"sci/src" "babashka.curl/src" "babashka.pods/src"
|
"sci/src" "babashka.curl/src" "babashka.pods/src"
|
||||||
"babashka.nrepl/src"
|
"babashka.nrepl/src"
|
||||||
"depstar/src"
|
"depstar/src"
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
(defn error-context [ex opts]
|
(defn error-context [ex opts]
|
||||||
(let [{:keys [:file :line :column]} (ex-data ex)]
|
(let [{:keys [:file :line :column]} (ex-data ex)]
|
||||||
(when file
|
(when (and file line)
|
||||||
(when-let [content (case file
|
(when-let [content (case file
|
||||||
"<expr>" (:expression opts)
|
"<expr>" (:expression opts)
|
||||||
"<preloads>" (:preloads opts)
|
"<preloads>" (:preloads opts)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue