Function: dape--configure-exceptions
dape--configure-exceptions is a natively compiled function defined in
dape.el.
Signature
(dape--configure-exceptions CONN &optional CB)
Documentation
Configure exception breakpoints for adapter CONN.
See dape-request for expected CB signature.
Source Code
;; Defined in /nix/store/1fiaif8pifqj2jh65rbg3fkhg3i56q42-emacs-packages-deps/share/emacs/site-lisp/elpa/dape-0.27.1/dape.el
(defun dape--configure-exceptions (conn &optional cb)
"Configure exception breakpoints for adapter CONN.
See `dape-request' for expected CB signature."
(let ((old-exceptions (cl-remove-if-not #'dape--exception-breakpoint-p
dape--breakpoints)))
(setq dape--breakpoints
(cl-remove-if #'dape--exception-breakpoint-p dape--breakpoints))
(dolist (filter (append (plist-get (dape--capabilities conn)
:exceptionBreakpointFilters)
nil))
(let* ((id (plist-get filter :filter))
(old (cl-find id old-exceptions
:key #'dape--exception-breakpoint-filter
:test #'equal))
(enabled (if old
(not (dape--breakpoint-disabled old))
(eq (plist-get filter :default) t))))
;; Append to keep exceptions at bottom of breakpoint list.
(setq dape--breakpoints
(nconc dape--breakpoints
(list (make-dape--exception-breakpoint
:filter id
:label (plist-get filter :label)
:default (plist-get filter :default)
:disabled (not enabled))))))))
(dape--with-request (dape--set-exception-breakpoints conn)
(run-hooks 'dape-update-ui-hook)
(dape--request-continue cb)))