Skip to content

Commit

Permalink
Merge pull request #212 from LukasRychtecky/205_File-name
Browse files Browse the repository at this point in the history
Added a file path into an error message while reading a file fixes #405
  • Loading branch information
danielcompton authored Aug 9, 2018
2 parents 83fe255 + 67e39ce commit 1d6fa49
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions kibit/src/kibit/driver.clj
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,13 @@
cli-reporter)
:rules (or rules all-rules))
(catch Exception e
(binding [*out* *err*]
(println "Check failed -- skipping rest of file")
(println (.getMessage e))))))
(let [e-info (ex-data e)]
(binding [*out* *err*]
(println (format "Check failed -- skipping rest of file (%s:%s:%s)"
(.getPath file)
(:line e-info)
(:column e-info)))
(println (.getMessage e)))))))
source-files))

(defn run [source-paths rules & args]
Expand Down

0 comments on commit 1d6fa49

Please sign in to comment.