Subject: Re: bug#33782: 27.0.50; Emacsclient ignores errors when its frame is deleted

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 10 Jul 2019 13:16:08 +0200

Noam Postavsky <[email-masked]> writes:

>>> $ emacsclient --create-frame --eval '(unwind-protect (error "foo")
>>> (delete-frame))' ; echo $?
>>> 0
>>>
>>> This means that if the frame created by Emacsclient is deleted, errors
>>> are ignored.  This seems like a bug; I wouldn't expect errors to be
>>> ignored in this case, because they should bubble up through the
>>> `unwind-protect' form.

[...]

> No, that's incorrect, unwind-protect doesn't catch errors, it just
> executes the handler forms (in this case (message "zot")) before the
> error finishes bubbling.

Yes, but there is no...  bubbling...  in this context.  The code is the
moral equivalent of saying

emacs -Q -nw --eval '(unwind-protect (error "foo") (kill-emacs))'; echo $?

in an emacsclient context, and this which also says "0".

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no