]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix ert backtrace saving for non-`signal'ed errors (Bug#28333)
authorNoam Postavsky <npostavs@gmail.com>
Sat, 23 Sep 2017 15:40:14 +0000 (11:40 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Thu, 28 Sep 2017 23:57:24 +0000 (19:57 -0400)
* 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

index d4276221ba5f87275c7e11a8bdbc1cd57a54026b..83acbacb8838bd6a519c03d31fd1c55f05bd4013 100644 (file)
@@ -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