Function: allout-widgets-hook-error-handler
allout-widgets-hook-error-handler is a byte-compiled function defined
in allout-widgets.el.gz.
Signature
(allout-widgets-hook-error-handler MODE ARGS)
Documentation
Process errors which occurred in the course of command hook operation.
We store a backtrace of the error information in the variable,
allout-widgets-last-hook-error, unset the error handlers, and
reraise the error, so that processing continues to the
encompassing condition-case.
Source Code
;; Defined in /usr/src/emacs/lisp/allout-widgets.el.gz
;;;_ > allout-widgets-hook-error-handler
(defun allout-widgets-hook-error-handler (mode args)
"Process errors which occurred in the course of command hook operation.
We store a backtrace of the error information in the variable,
`allout-widgets-last-hook-error', unset the error handlers, and
reraise the error, so that processing continues to the
encompassing `condition-case'."
;; first deconstruct special error environment so errors here propagate
;; to encompassing condition-case:
(setq debugger 'debug
debug-on-error nil
debug-on-signal nil)
(let* ((bt (with-output-to-string (backtrace)))
(this "allout-widgets-hook-error-handler")
(header
(format "allout-widgets-last-hook-error stored, %s/%s %s %s"
this mode args
(format-time-string "%e-%b-%Y %r"))))
;; post to *Messages* then immediately replace with more compact notice:
(message "%s" (setq allout-widgets-last-hook-error
(format "%s:\n%s" header bt)))
(message header) (sit-for allout-widgets-hook-error-post-time)
;; reraise the error, or one concerning this function if unexpected:
(if (equal mode 'error)
(apply #'signal args)
(error "%s: Unexpected mode, %s %s" this mode args))))