mirror of
https://github.com/SqrtMinusOne/org-journal-tags.git
synced 2025-12-10 10:53:04 +03:00
fix: handle the broken database gracefully
This commit is contained in:
parent
f8ad372c58
commit
b395f5c90a
1 changed files with 5 additions and 1 deletions
|
|
@ -247,7 +247,11 @@ The properties are:
|
|||
(with-temp-buffer
|
||||
(insert-file-contents org-journal-tags-db-file)
|
||||
(goto-char (point-min))
|
||||
(setf org-journal-tags-db (read (current-buffer))))))
|
||||
(condition-case err
|
||||
(setf org-journal-tags-db (read (current-buffer)))
|
||||
(error (progn
|
||||
(message "Recreating the database because of an error")
|
||||
(setf org-journal-tags-db (org-journal-tags-db--empty))))))))
|
||||
|
||||
(defun org-journal-tags-db-ensure ()
|
||||
"Ensure that the database has been loaded."
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue