[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#75065: Upon archive download failure print the original error
From: |
Stefan Monnier |
Subject: |
bug#75065: Upon archive download failure print the original error |
Date: |
Thu, 26 Dec 2024 14:17:46 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
>>> (dolist (archive package-archives)
>>> - (condition-case-unless-debug nil
>>> + (condition-case-unless-debug err
>>> (package--download-one-archive archive "archive-contents" async)
>>> - (error (message "Failed to download `%s' archive."
>>> - (car archive))))))
>>> + (error (message "Failed to download `%s' archive. Error: %S"
>>> + (car archive) (cdr err))))))
>>>
>> Stefan and Philip, is this okay to install?
I agree with the idea behind the patch, but printing just `(cdr err)`
doesn't seem right, it should print the whole of `err`.
> It seems harmless, I am just uncertain if we should prefer %S or %s to
> format the error message.
`%s` to print `err` or `(cdr err)` would be wrong, since `%s` is for use
with strings rather than lists. IOW, IMO, it should be either
...%S" ... err)
or
...%s" ... (error-message-string err))
where the first is a bit more "debugging/developer" friendly and the second
is a bit more "user" friendly.
Stefan
- bug#75065: Upon archive download failure print the original error, Konstantin Kharlamov, 2024/12/24
- bug#75065: Upon archive download failure print the original error, Eli Zaretskii, 2024/12/26
- bug#75065: Upon archive download failure print the original error, Stefan Monnier, 2024/12/26
- bug#75065: Upon archive download failure print the original error, Konstantin Kharlamov, 2024/12/26
- bug#75065: Upon archive download failure print the original error, Konstantin Kharlamov, 2024/12/26
- bug#75065: Upon archive download failure print the original error, Konstantin Kharlamov, 2024/12/26
- bug#75065: Upon archive download failure print the original error, Eli Zaretskii, 2024/12/27
- bug#75065: Upon archive download failure print the original error, Stefan Monnier, 2024/12/27
- bug#75065: Upon archive download failure print the original error, Konstantin Kharlamov, 2024/12/27