From 31581cc1134c6bec36bd254d4c070ebb62e7b8c3 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Sun, 3 Mar 2024 03:41:28 +0200 Subject: gnosis-edit-update-note: Add asserts --- gnosis.el | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gnosis.el') diff --git a/gnosis.el b/gnosis.el index 3a74160..b0bdc79 100644 --- a/gnosis.el +++ b/gnosis.el @@ -1324,6 +1324,12 @@ TAGS: Tags for note, used to organize & differentiate between notes EXTRA-NOTES: Notes to display after user-input IMAGE: Image to display before user-input SECOND-IMAGE: Image to display after user-input" + (cl-assert (stringp main) nil "Main must be a string") + (cl-assert (stringp image) nil "Image must be a string, path to image file from `gnosis-images-dir'") + (cl-assert (stringp second-image) nil "Second-image must be a string, path to image file from `gnosis-images-dir'") + (cl-assert (stringp extra-notes) nil "Extra-notes must be a string") + (cl-assert (listp tags) nil "Tags must be a list of strings") + (cl-assert (and (listp ef) (length= ef 3)) nil "ef must be a list of 3 floats") ;; Construct the update clause for the emacsql update statement. (cl-loop for (field . value) in `((main . ,main) -- cgit v1.2.3