[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/org-edna d527569 48/72: Handle all errors in Edna forms
From: |
Ian Dunn |
Subject: |
[elpa] scratch/org-edna d527569 48/72: Handle all errors in Edna forms |
Date: |
Sun, 21 May 2017 21:11:26 -0400 (EDT) |
branch: scratch/org-edna
commit d52756905a038b5d98ea4626335b8181a9d2ee9b
Author: Ian D <address@hidden>
Commit: Ian D <address@hidden>
Handle all errors in Edna forms
* org-edna.el (org-edna-run): Catch and report all errors.
(org-edna-finder/match): Don't convert arguments.
---
org-edna.el | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/org-edna.el b/org-edna.el
index 370b50a..89cda05 100644
--- a/org-edna.el
+++ b/org-edna.el
@@ -197,8 +197,13 @@ Currently, the following are handled:
(member to (cons 'done org-done-keywords)))
(condition-case err
,@body
- (invalid-syntax-error
- (org-edna--print-syntax-error (cdr err))))
+ (error
+ (if (eq (car err) 'invalid-syntax-error)
+ (org-edna--print-syntax-error (cdr err))
+ (message "Edna Error: %s" (error-message-string err)))
+ (setq org-block-entry-blocking (org-get-heading))
+ ;; Block
+ nil))
;; Return t for the blocker to let the calling function know that there
;; is no block here.
t)))
@@ -239,8 +244,7 @@ SCOPE and SKIP are their counterparts in `org-map-entries',
but
as strings.
SCOPE defaults to \"agenda\", and SKIP defaults to nil."
- (setq scope (if scope (intern scope) 'agenda))
- (when skip (setq skip (intern skip)))
+ (setq scope (or scope 'agenda)
(org-map-entries
;; Find all entries in the agenda files that match the given tag.
(lambda nil (point-marker))
- [elpa] scratch/org-edna 70f949c 35/72: Added note about quoting file names to documentation., (continued)
- [elpa] scratch/org-edna 70f949c 35/72: Added note about quoting file names to documentation., Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 24a2837 38/72: Added tests for considerations, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 4b91a43 25/72: Added file for tests, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna bb284dc 27/72: Fixed parsing bug, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna d248565 21/72: Fix uses of substring, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 7978874 24/72: Added tests for ids and match finders, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 6448307 30/72: Added test for empty argument list, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 9e4d833 32/72: Fixed error in re-search, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna d022d2f 40/72: Added copyright and licensing information to all files, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 991782f 31/72: Added documentation for each condition, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna d527569 48/72: Handle all errors in Edna forms,
Ian Dunn <=
- [elpa] scratch/org-edna f27a89f 45/72: Use example instead of src to make HTML export prettier, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna cc3cd47 22/72: Added configuration option to use inheritance, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 3cc0913 34/72: Added some more test headings, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 65d3049 37/72: Fix considerations, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 1b492e1 42/72: Fixed copyright notices, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 5a9a42a 43/72: Added copyright date to source files, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 1f76403 15/72: Renamed to Org-Edna., Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna e03fa9c 60/72: Fixed up chain test, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna ad7bdc9 62/72: Fixed actions and documentation, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 96ca42c 65/72: Compile targets before running tests, Ian Dunn, 2017/05/21