unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Error does not throw to debugger in 'when' block
@ 2023-01-12  6:51 Arthur Miller
  2023-01-12  8:28 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Arthur Miller @ 2023-01-12  6:51 UTC (permalink / raw)
  To: help-gnu-emacs

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?




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-01-12 22:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-12  6:51 Error does not throw to debugger in 'when' block Arthur Miller
2023-01-12  8:28 ` Eli Zaretskii
2023-01-12  9:08   ` Arthur Miller
2023-01-12 11:26     ` Michael Heerdegen
2023-01-12 19:18       ` Arthur Miller
2023-01-12 21:15         ` Michael Heerdegen
2023-01-12 22:49           ` Arthur Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).