Subject: Re: bug#75065: Upon archive download failure print the original error

From: Eli Zaretskii <[email-masked]>
Date: Fri, 27 Dec 2024 09:22:19 +0200

> From: Stefan Monnier <[email-masked]>
> Cc: Philip Kaludercic <[email-masked]>,  Eli Zaretskii <[email-masked]>,
>   [email-masked]
> Date: Thu, 26 Dec 2024 15:40:21 -0500
> 
> > The `car` seems to just contain word error. Here's how both compare:
> >
> > • current patch with `(cdr err)`:
> >     Failed to download ‘melpa’ archive. Error: ("Location melpa.org/packages/ is not a url nor an absolute file name")
> >
> > • suggested change with `err`:
> >     Failed to download ‘melpa’ archive. Error: (error "Location melpa.org/packages/ is not a url nor an absolute file name")
> >
> > I can of course remove the word `Error` in the second case.
> > My question then is: will `(car err)` always be the word "error"? Or
> > may there be another content?
> 
> The shape and content of `err` depends on the actual error that caused
> the download to fail.  `(car err)` contains the error "type", which can
> be `error` but can also be more specific such as
> `wrong-number-of-arguments`, `file-error`, ...

Yes, the car part is not redundant, it can include useful information
that we should not lose.