Make error messages in project/read refer to correct file
This commit is contained in:
parent
4fe1b3df09
commit
f20230c490
1 changed files with 2 additions and 2 deletions
|
@ -631,10 +631,10 @@
|
|||
(binding [*ns* (find-ns 'leiningen.core.project)]
|
||||
(try (load-file file)
|
||||
(catch Exception e
|
||||
(throw (Exception. "Error loading project.clj" e)))))
|
||||
(throw (Exception. (format "Error loading %s" file) e)))))
|
||||
(let [project (resolve 'leiningen.core.project/project)]
|
||||
(when-not project
|
||||
(throw (Exception. "project.clj must define project map.")))
|
||||
(throw (Exception. (format "%s must define project map" file))))
|
||||
;; return it to original state
|
||||
(ns-unmap 'leiningen.core.project 'project)
|
||||
(init-profiles (project-with-profiles @project) profiles))))
|
||||
|
|
Loading…
Reference in a new issue