File tree Expand file tree Collapse file tree 5 files changed +20
-4
lines changed Expand file tree Collapse file tree 5 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 74
74
:exclude-linters [:implicit-dependencies ]}}
75
75
:clj-kondo [:test
76
76
{:dependencies [[clj-kondo " 2021.06.18" ]]}]}
77
- :jvm-opts [" -Djava.net.preferIPv4Stack=true" ])
77
+
78
+ :jvm-opts ~(cond-> [" -Djava.net.preferIPv4Stack=true" ]
79
+ (System/getenv " CI" )
80
+ (conj " -Drefactor-nrepl.internal.log-exceptions=true" )))
Original file line number Diff line number Diff line change 91
91
(when ns
92
92
(if-let [cached-ast-or-err (get-ast-from-cache ns file-content)]
93
93
cached-ast-or-err
94
- (when-let [new-ast-or-err (try (build-ast ns aliases) (catch Throwable th th))]
94
+ (when-let [new-ast-or-err (try
95
+ (build-ast ns aliases)
96
+ (catch Throwable th
97
+ (when (System/getProperty " refactor-nrepl.internal.log-exceptions" )
98
+ (-> th .printStackTrace))
99
+ th))]
95
100
(update-ast-cache file-content ns new-ast-or-err))))))
96
101
97
102
(defn- throw-ast-in-bad-state
131
136
(doseq [f (tracker/project-files-in-topo-order )]
132
137
(try
133
138
(ns-ast (slurp f))
134
- (catch Throwable _th))) ; noop, ast-status will be reported separately
139
+ (catch Throwable th
140
+ (when (System/getProperty " refactor-nrepl.internal.log-exceptions" )
141
+ (-> th .printStackTrace))
142
+ nil ; noop, ast-status will be reported separately
143
+ )))
135
144
(ast-stats ))
136
145
137
146
(defn node-at-loc? [^long loc-line ^long loc-column node]
Original file line number Diff line number Diff line change 85
85
(mapcat #(try
86
86
(get-macro-definitions-in-file-with-caching %)
87
87
(catch Exception e
88
+ (when (System/getProperty " refactor-nrepl.internal.log-exceptions" )
89
+ (-> e .printStackTrace))
88
90
(when-not ignore-errors?
89
91
(throw e)))))))
90
92
Original file line number Diff line number Diff line change 109
109
(find-symbol-in-ast fully-qualified-name)
110
110
(filter :line-beg ))
111
111
(catch Exception e
112
+ (when (System/getProperty " refactor-nrepl.internal.log-exceptions" )
113
+ (-> e .printStackTrace))
112
114
(when-not ignore-errors
113
115
(throw e))))
114
116
locs (into
Original file line number Diff line number Diff line change 52
52
53
53
(defn ns-ast-throw-error-for-five [^String content]
54
54
(if (.contains content " com.example.five" )
55
- (throw (IllegalThreadStateException. " FAILED !" ))
55
+ (throw (IllegalThreadStateException. " Expected !" ))
56
56
(#'analyzer/cachable-ast content)))
57
57
58
58
(deftest test-find-two-foo-errors-ignored
You can’t perform that action at this time.
0 commit comments