When debugging, forward worker errors to main thread

WIP-cache
Hugo Thunnissen 9 months ago
parent f9f12590e8
commit f6cc199886

@ -79,7 +79,8 @@
(throw 'return (phpinspect-find-statement-before-point bmap child point))) (throw 'return (phpinspect-find-statement-before-point bmap child point)))
(when (phpinspect-statement-introduction-p token) (when (phpinspect-statement-introduction-p token)
(throw 'return previous-siblings)) (throw 'return previous-siblings))
(push child previous-siblings))))) (unless (phpinspect-comment-p token)
(push child previous-siblings))))))
previous-siblings)) previous-siblings))
(defun phpinspect--get-last-statement-in-token (token) (defun phpinspect--get-last-statement-in-token (token)

@ -152,6 +152,7 @@ already present in the queue."
(phpinspect-worker-skip-next-pause worker)) (phpinspect-worker-skip-next-pause worker))
(phpinspect-thread-pause phpinspect-worker-pause-time mx continue)) (phpinspect-thread-pause phpinspect-worker-pause-time mx continue))
(setf (phpinspect-worker-skip-next-pause worker) nil))) (setf (phpinspect-worker-skip-next-pause worker) nil)))
((debug error) (thread-signal main-thread 'phpinspect-worker-error err))
(t (phpinspect--log "Phpinspect worker thread errored :%s" err)))) (t (phpinspect--log "Phpinspect worker thread errored :%s" err))))
(phpinspect--log "Worker thread exiting") (phpinspect--log "Worker thread exiting")
(message "phpinspect worker thread exited"))) (message "phpinspect worker thread exited")))

Loading…
Cancel
Save