From fb4685238726a79599f6388318916d2962da93ae Mon Sep 17 00:00:00 2001 From: Konstantin Kharlamov Date: Tue, 24 Dec 2024 18:16:41 +0300 Subject: [PATCH] Upon archive download failure print the original error * lisp/emacs-lisp/package.el (package--download-and-read-archives): upon catching exception, use the exception message as part of the error to provide more context about the failure. --- lisp/emacs-lisp/package.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 5f785071ea3..cb81efc71f0 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1829,10 +1829,10 @@ 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. Error: %S" + (car archive) (cdr err)))))) (defvar package-refresh-contents-hook (list #'package--download-and-read-archives) "List of functions to call to refresh the package archive. -- 2.47.1