Function: eca--log-error
eca--log-error is a natively compiled function defined in eca.el.
Signature
(eca--log-error SESSION ERR &optional CONTEXT BACKTRACE)
Documentation
Log error ERR to the Emacs errors buffer for SESSION.
Optional CONTEXT is a string describing what was happening
when the error occurred. Optional BACKTRACE is a list of
frames captured via backtrace-get-frames.
Source Code
;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca.el
(defun eca--log-error (session err &optional context backtrace)
"Log error ERR to the Emacs errors buffer for SESSION.
Optional CONTEXT is a string describing what was happening
when the error occurred. Optional BACKTRACE is a list of
frames captured via `backtrace-get-frames'."
(let ((buffer (get-buffer-create (eca--emacs-errors-buffer-name session))))
(with-current-buffer buffer
(goto-char (point-max))
(insert (format "[%s] %s%s\n"
(format-time-string "%Y-%m-%d %H:%M:%S")
(if context (format "%s: " context) "")
(error-message-string err)))
(when backtrace
(dolist (frame backtrace)
(let ((fun (backtrace-frame-fun frame)))
(when fun
(insert (format " at %s\n" fun)))))
(insert "\n")))))