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

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

trapping process filter error in a thread


From: Thien-Thi Nguyen
Subject: trapping process filter error in a thread
Date: Tue, 22 Mar 2022 10:01:29 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

I'm in the process of writing a dead-link checker and would like
to use Emacs' threads and ‘url-http’ funcs.  I've run into a
problem w/ GNU Emacs 27.1 (Debian), however: When there is a TLS
problem, i am unable to trap the process filter error.  It seems
‘condition-case’ is not the right tool for the job.

Attached here is a fragment that encapsulates the heart of the
problem:

Attachment: bad.el
Description: application/emacs-lisp

and a *compilation* buffer capture that shows how the process
filter error is not trapped:

Attachment: bad.out
Description: Binary data

My questions are:

(a) Can anyone else reproduce this on their Emacs?
    (Obviously your Emacs has to be built w/ thread support.)

(b) Does the same code work in different versions of Emacs?

(c) Is there a recommended way to trap process filter errors
    for a noninteractive (perhaps batch) session?

(d) Is there a more idiomatic way to work w/ threads and
    ‘url-http’ (or async network connections, in general)?

Thank-you for any insight into this corner of Emacs Lisp!

-- 
Thien-Thi Nguyen -----------------------------------------------
 (defun responsep (query)               ; (2022) Software Libero
   (pcase (context query)               ;       = Dissenso Etico
     (`(technical ,ml) (correctp ml))
     ...))                              748E A0E8 1CB8 A748 9BFA
--------------------------------------- 6CE4 6703 2224 4C80 7502

Attachment: signature.asc
Description: PGP signature


reply via email to

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