emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org a782827 1/3: org-persist.el/org-persist--read-index


From: ELPA Syncer
Subject: [elpa] externals/org a782827 1/3: org-persist.el/org-persist--read-index: Provide warning if reader fails
Date: Thu, 21 Oct 2021 04:57:29 -0400 (EDT)

branch: externals/org
commit a78282746d9498bbabdc31e11caaa23664521a1d
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>

    org-persist.el/org-persist--read-index: Provide warning if reader fails
    
    * lisp/org-persist.el (org-persist--read-index): Inform user when
    reader fails to read existing index file.
---
 lisp/org-persist.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/org-persist.el b/lisp/org-persist.el
index b93d3e5..d5ec5d4 100644
--- a/lisp/org-persist.el
+++ b/lisp/org-persist.el
@@ -111,7 +111,11 @@ When BUFFER is nil, return plist for global VAR."
               (condition-case err
                   (read (current-buffer))
                 ;; Recover gracefully if index file is corrupted.
-                (error nil)))))))
+                (error
+                 (warn "Emacs reader failed to read data for 
`org-persist--index' from %S. The error was: %S"
+                       (org-file-name-concat org-persist-directory 
org-persist-index-file)
+                       (error-message-string err))
+                 nil)))))))
 
 (cl-defun org-persist-register (var &optional buffer &key inherit)
   "Register VAR in BUFFER to be persistent.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]