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

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

[nongnu] elpa/emacsql f54142f1eb 062/427: Argument list checking in emac


From: ELPA Syncer
Subject: [nongnu] elpa/emacsql f54142f1eb 062/427: Argument list checking in emacsql-format.
Date: Tue, 13 Dec 2022 02:59:28 -0500 (EST)

branch: elpa/emacsql
commit f54142f1eb1cd5bceb8130cf9bfafbfa8dd3d74b
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>

    Argument list checking in emacsql-format.
---
 emacsql.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/emacsql.el b/emacsql.el
index e2c646d578..728b0a8f42 100644
--- a/emacsql.el
+++ b/emacsql.el
@@ -329,6 +329,8 @@ See also `emacsql-with-errors'."
 (defun emacsql-format (expansion &rest args)
   "Fill in the variables EXPANSION with ARGS."
   (cl-destructuring-bind (format . vars) expansion
+    (unless (= (length args) (length vars))
+      (error "Wrong number of arguments for SQL template."))
     (apply #'format format
            (cl-loop for (i . kind) in vars collect
                     (let ((thing (nth i args)))



reply via email to

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