Function: ert--should-signal-hook

ert--should-signal-hook is a byte-compiled function defined in ert.el.gz.

Signature

(ert--should-signal-hook ERROR-SYMBOL DATA)

Documentation

Stupid hack to stop condition-case from catching ert signals.

It should only be stopped when ran from inside ert--run-test-internal.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/ert.el.gz
;; See Bug#24402 for why this exists
(defun ert--should-signal-hook (error-symbol data)
  "Stupid hack to stop `condition-case' from catching ert signals.
It should only be stopped when ran from inside `ert--run-test-internal'."
  (when (and (not (symbolp debugger))   ; only run on anonymous debugger
             (memq error-symbol '(ert-test-failed ert-test-skipped)))
    (funcall debugger 'error (cons error-symbol data))))