Skip to content

Commit

Permalink
Update buttercup--debugger to ignore :backtrace-base
Browse files Browse the repository at this point in the history
The arguments to debugger sometime have :backtrace-base entry-point:

 IF the desired entry point of the debugger is higher in the call
 stack, it can be specified with the keyword argument
 ‘:backtrace-base’, whose format should be the same as the BASE
 argument of ‘backtrace-frame’.

buttercup does not care about that argument at the moment, ignore it.
  • Loading branch information
snogge committed Mar 15, 2024
1 parent 8f97ea4 commit 2324fb1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions buttercup.el
Original file line number Diff line number Diff line change
Expand Up @@ -2080,14 +2080,15 @@ failed -- The second value is the description of the expectation

(defun buttercup--debugger (&rest args)
"Debugger function that return error context with an exception.
ARGS according to `debugger'."
;; If we do not do this, Emacs will not run this handler on
;; subsequent calls. Thanks to ert for this.
(setq num-nonmacro-input-events (1+ num-nonmacro-input-events))
(throw 'buttercup-debugger-continue
(list 'failed args
(cl-destructuring-bind (_ (signal-type . data)) args
;; args is (error (signal . data) ....) where the tail
;; may be empty
(cl-destructuring-bind (signal-type . data) (cl-second args)
(unless (eq signal-type 'buttercup-pending)
(buttercup--backtrace))))))

Expand Down

0 comments on commit 2324fb1

Please sign in to comment.