diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2024-12-27 11:58:30 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2024-12-27 11:58:30 -0500 |
commit | a99e1cc745047977b0b7cbd25fe9df66e9c86a39 (patch) | |
tree | 3585e10d10c881a28a21ab8c4f03f41db7536246 /lisp/emacs-lisp | |
parent | 76170ea5a0dff45d3feedf523c4c6809f1a56a59 (diff) | |
download | emacs-a99e1cc745047977b0b7cbd25fe9df66e9c86a39.tar.gz emacs-a99e1cc745047977b0b7cbd25fe9df66e9c86a39.tar.bz2 emacs-a99e1cc745047977b0b7cbd25fe9df66e9c86a39.zip |
(package--download-and-read-archives): Fix bug#75065
* lisp/emacs-lisp/package.el (package--download-and-read-archives):
Include the error info in the error message.
Suggested by Konstantin Kharlamov <Hi-Angel@yandex.ru>.
(package-refresh-contents, package-menu--perform-transaction):
Use `error-message-string`.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/package.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 5f785071ea3..bff45d57b07 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1829,10 +1829,11 @@ Populate `package-archive-contents' with the result. If optional argument ASYNC is non-nil, perform the downloads asynchronously." (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: %s" + (car archive) + (error-message-string err)))))) (defvar package-refresh-contents-hook (list #'package--download-and-read-archives) "List of functions to call to refresh the package archive. @@ -1856,7 +1857,8 @@ downloads in the background." (when (and (package-check-signature) (file-exists-p default-keyring)) (condition-case-unless-debug error (package-import-keyring default-keyring) - (error (message "Cannot import default keyring: %S" (cdr error)))))) + (error (message "Cannot import default keyring: %s" + (error-message-string error)))))) (run-hook-with-args 'package-refresh-contents-hook async)) @@ -3989,8 +3991,9 @@ Return nil if there were no errors; non-nil otherwise." (package-delete elt nil 'nosave)) (error (push (package-desc-full-name elt) errors) - (message "Error trying to delete `%s': %S" - (package-desc-full-name elt) err))))) + (message "Error trying to delete `%s': %s" + (package-desc-full-name elt) + (error-message-string err)))))) errors)) (defun package--update-selected-packages (add remove) |