From: Noam Postavsky <npostavs@gmail.com> Date: Sat, 23 Sep 2017 15:40:14 +0000 (-0400) Subject: Fix ert backtrace saving for non-`signal'ed errors (Bug#28333) X-Git-Tag: emacs-26.0.90~104^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=af130f900fc499f71ea22f10ba055a75ce35ed4e;p=emacs.git Fix ert backtrace saving for non-`signal'ed errors (Bug#28333) * lisp/emacs-lisp/ert.el (ert--run-test-debugger): Take the frames above the `debugger' frame, rather than assuming there will be a `signal' frame. --- diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index d4276221ba5..83acbacb883 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -742,9 +742,8 @@ run. ARGS are the arguments to `debugger'." ;; backtrace ready for printing is important for batch ;; use. ;; - ;; Grab the frames starting from `signal', frames below - ;; that are all from the debugger. - (backtrace (backtrace-frames 'signal)) + ;; Grab the frames above the debugger. + (backtrace (cdr (backtrace-frames debugger))) (infos (reverse ert--infos))) (setf (ert--test-execution-info-result info) (cl-ecase type