(ert-deftest mod-test-non-local-exit-signal-test ()
(should-error (mod-test-signal))
- (let (debugger-args backtrace)
+ (let (handler-err backtrace)
(should-error
- (let ((debugger (lambda (&rest args)
- (setq debugger-args args
- backtrace (with-output-to-string (backtrace)))
- (cl-incf num-nonmacro-input-events)))
- (debug-on-signal t))
+ (handler-bind
+ ((error (lambda (err)
+ (setq handler-err err
+ backtrace (with-output-to-string (backtrace))))))
(mod-test-signal)))
- (should (equal debugger-args '(error (error . 56))))
+ (should (equal handler-err '(error . 56)))
(should (string-match-p
(rx bol " mod-test-signal()" eol)
backtrace))))