Subject: Re: [bug#74542] [PATCH 02/11] gnu-maintenance:‘import-html-release’ doesn’t abort upon HTTP 404.

From: Simon Tournier <[email-masked]>
Date: Tue, 26 Nov 2024 16:09:50 +0100

Hi,

On Tue, 26 Nov 2024 at 11:33, Ludovic Courtès <[email-masked]> wrote:

> +  #:use-module (srfi srfi-34)

[...]

> +  (guard (c ((http-get-error? c)
> +             (warning (G_ "failed to download '~a': ~a (~a)~%")
> +                      url (http-get-error-code c)
> +                      (http-get-error-reason c))
> +             '()))
> +    (let* ((uri   (string->uri url))
> +           (port  (http-fetch/cached uri #:ttl 3600))
> +           (sxml  (html->sxml port)))
> +      (close-port port)
> +      (delete-duplicates (html-links sxml)))))

I’m always confused by which framework for exception does the project
rely on?  There is old ’catch’ and ’throw’ then sometimes new
’with-exception-handler’ and ’raise’.  And also SRFI 34.

What’s the preferred convention?

Cheers,
simon