[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: trapping process filter error in a thread
From: |
Emanuel Berg |
Subject: |
Re: trapping process filter error in a thread |
Date: |
Tue, 22 Mar 2022 20:28:12 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Thien-Thi Nguyen wrote:
> I'm in the process of writing a dead-link checker
Good idea ...
> 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.
>
> (defun func ()
> (let ((noninteractive t))
> (condition-case nil
> (if (url-http-file-exists-p url)
> "ok"
> "dead")
> (t "error"))))
Isn't the syntax/usage rather as in e.g.
(defun erc-element-next (&optional prev)
(interactive "P")
(when (erc-at-prompt-p)
(goto-char (point-min)) )
(condition-case nil
(if prev
(erc-button-previous)
(erc-button-next) )
(error (progn
(goto-char (point-max))
(when prev
(erc-bol) )))))
> (a) Can anyone else reproduce this on their Emacs?
> (Obviously your Emacs has to be built w/
> thread support.)
What are threads in this context and how do you build Emacs
for that
> (c) Is there a recommended way to trap process filter errors
> for a noninteractive (perhaps batch) session?
What's a process filter?
> Thank-you for any insight into this corner of Emacs Lisp!
You don't say ;)
--
underground experts united
https://dataswamp.org/~incal