mirror of
https://gitlab.com/eql/lqml.git
synced 2025-12-06 02:30:38 -08:00
add proper error message for QML Lisp.call() when function is undefined
This commit is contained in:
parent
dd316078d0
commit
69ddceb104
1 changed files with 8 additions and 3 deletions
|
|
@ -19,11 +19,16 @@
|
|||
;; Every 'Lisp.call()' or 'Lisp.apply()' function call in QML will call this
|
||||
;: function. The variable *CALLER* will be bound to the calling QQuickItem,
|
||||
;; if passed with 'this' as first argument to 'Lisp.call()' / 'Lisp.apply()'.
|
||||
(let ((*caller* (if (zerop caller)
|
||||
(let ((fun (string-to-symbol function))
|
||||
(*caller* (if (zerop caller)
|
||||
*caller*
|
||||
(qt-object caller))))
|
||||
(apply (string-to-symbol function)
|
||||
arguments)))
|
||||
(if (fboundp fun)
|
||||
(apply fun arguments)
|
||||
(let ((msg (format nil "[LQML:error] Lisp.call(): function ~S is undefined." function)))
|
||||
(when *break-on-errors*
|
||||
(break msg)
|
||||
(format *error-output* "~%~A~%" msg))))))
|
||||
|
||||
;;; utils
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue