help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Error does not throw to debugger in 'when' block


From: Arthur Miller
Subject: Error does not throw to debugger in 'when' block
Date: Thu, 12 Jan 2023 07:51:01 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

When running this little code, I have observed that 'error' does not end in
debugger:

(defun new-patch (&optional patch-name)
  (interactive "sPatch name: ")
  (let ((path (expand-file-name patch-name)))
    (message "PATH: %s" path)
    (when (file-exists-p path)
      (error "A worktree with this name already exists"))))

If I run this code, I see it correctly executes error, but it does not open
debugger. If I place cursor after the error form, debugger is
opened. Value of debug-on-error is 't.

This is output in *Messages* buffer for 'Emacs -Q':

PATH: /home/arthur/repos/emsrc/28.2
progn: A worktree with this name already exists
Mark set [2 times]

Just curious, is this intended new behaviour for 'error' or a bug?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]