From 847ed811022f4d4fe43f2d5e14660f93538423dd Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sat, 23 Sep 2017 11:40:14 -0400 Subject: [PATCH] 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. --- lisp/emacs-lisp/ert.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index d4276221ba..83acbacb88 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -742,9 +742,8 @@ ert--run-test-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 -- 2.11.0