Skip to content

Commit

Permalink
Change: Improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
alphapapa committed May 24, 2018
1 parent 52a1def commit afad077
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion org-ql.el
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ like one returned by `date-to-day'."
(org-element-timestamp-interpreter date-element 'ignore))
target-day-number))
(error "Unknown date-element type: %s" (org-element-property :type date-element)))))
(otherwise (error "COMPARATOR (%s) must be a function, and DATE (%s) must be a string" comparator target-date)))))
(otherwise (user-error "COMPARATOR (%s) must be a function, and DATE (%s) must be a string or day-number integer"
comparator target-date)))))

(defsubst org-ql--date-plain-p (&optional comparator target-date)
(org-agenda-ng--date-p :date comparator target-date))
Expand Down

0 comments on commit afad077

Please sign in to comment.