File tree Expand file tree Collapse file tree 1 file changed +0
-11
lines changed Expand file tree Collapse file tree 1 file changed +0
-11
lines changed Original file line number Diff line number Diff line change 253253 (flag-duplicates )
254254 (flag-tooling ))))
255255
256- (defn- compile-like-exception?
257- " 'Compile-like' exceptions are those that happen at runtime (and therefore never
258- include a `:phase`) which however, represent code that cannot possibly work,
259- and thus are a compile-like exception (i.e. a linter could have caught them)."
260- [{:keys [phase type message]}]
261- (boolean
262- (and (nil? phase)
263- (= type 'java.lang.IllegalArgumentException)
264- (some->> message (re-find #"^No matching (field|method)" )))))
265-
266256(defn- analyze-cause
267257 " Analyze the `cause-data` of an exception, in `Throwable->map` format."
268258 [cause-data print-fn]
272262 phase (-> cause-data :data :clojure.error/phase )
273263 m {:class (name (:type cause-data))
274264 :phase phase
275- :compile-like (str (compile-like-exception? cause-data))
276265 :message (:message cause-data)
277266 :stacktrace (analyze-stacktrace-data
278267 (cond (seq (:trace cause-data)) (:trace cause-data)
You can’t perform that action at this time.
0 commit comments