aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoam Postavsky2017-09-23 11:40:14 -0400
committerNoam Postavsky2017-09-28 19:57:24 -0400
commitaf130f900fc499f71ea22f10ba055a75ce35ed4e (patch)
treed0523ca201979b85b0dd14ad224f01ac2daec3cb
parent7476eeaa236039b8ebd09aad6bd977d26646ace6 (diff)
downloademacs-af130f900fc499f71ea22f10ba055a75ce35ed4e.tar.gz
emacs-af130f900fc499f71ea22f10ba055a75ce35ed4e.zip
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.
-rw-r--r--lisp/emacs-lisp/ert.el5
1 files changed, 2 insertions, 3 deletions
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'."
742 ;; backtrace ready for printing is important for batch 742 ;; backtrace ready for printing is important for batch
743 ;; use. 743 ;; use.
744 ;; 744 ;;
745 ;; Grab the frames starting from `signal', frames below 745 ;; Grab the frames above the debugger.
746 ;; that are all from the debugger. 746 (backtrace (cdr (backtrace-frames debugger)))
747 (backtrace (backtrace-frames 'signal))
748 (infos (reverse ert--infos))) 747 (infos (reverse ert--infos)))
749 (setf (ert--test-execution-info-result info) 748 (setf (ert--test-execution-info-result info)
750 (cl-ecase type 749 (cl-ecase type