243 |
243 |
(send-to-emacs `(:return ~(thread-name (current-thread)) |
244 |
244 |
(:ok ~result) ~id))) |
245 |
245 |
;; swank function not defined, abort |
246 |
|
(send-to-emacs `(:return ~(thread-name (current-thread)) (:abort) ~id)))) |
|
246 |
(send-to-emacs `(:return ~(thread-name (current-thread)) (:abort ~(str (Exception. (str "unknow swank function " (first form))))) ~id)))) |
247 |
247 |
(catch Throwable t |
248 |
248 |
;; Thread/interrupted clears this thread's interrupted status; if |
249 |
249 |
;; Thread.stop was called on us it may be set and will cause an |
… |
255 |
255 |
(cond |
256 |
256 |
(debug-quit-exception? t) |
257 |
257 |
(do |
258 |
|
(send-to-emacs `(:return ~(thread-name (current-thread)) (:abort) ~id)) |
|
258 |
(send-to-emacs `(:return ~(thread-name (current-thread)) (:abort ~(str (.getCause t))) ~id)) |
259 |
259 |
(if-not (zero? *sldb-level*) |
260 |
260 |
(throw t))) |
261 |
261 |
|
262 |
262 |
(debug-abort-exception? t) |
263 |
263 |
(do |
264 |
|
(send-to-emacs `(:return ~(thread-name (current-thread)) (:abort) ~id)) |
|
264 |
(send-to-emacs `(:return ~(thread-name (current-thread)) (:abort ~(str (.getCause t))) ~id)) |
265 |
265 |
(if-not (zero? *sldb-level*) |
266 |
266 |
(throw debug-abort-exception))) |
267 |
267 |
|
268 |
268 |
(debug-continue-exception? t) |
269 |
269 |
(do |
270 |
|
(send-to-emacs `(:return ~(thread-name (current-thread)) (:abort) ~id)) |
|
270 |
(send-to-emacs `(:return ~(thread-name (current-thread)) (:abort ~(str (.getCause t))) ~id)) |
271 |
271 |
(throw t)) |
272 |
272 |
|
273 |
273 |
(debugger-exception? t) |
… |
281 |
281 |
(if debug-swank-clojure t (or (.getCause t) t)) |
282 |
282 |
id) |
283 |
283 |
;; reply with abort |
284 |
|
(finally (send-to-emacs `(:return ~(thread-name (current-thread)) (:abort) ~id))))))))) |
|
284 |
(finally (send-to-emacs `(:return ~(thread-name (current-thread)) (:abort ~(str (.getCause t))) ~id))))))))) |
285 |
285 |
|
286 |
286 |
(defn- add-active-thread [thread] |
287 |
287 |
(dosync |