From 924df92528bfe9b8dce833f04d1d809a5a8e1220 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Mon, 17 Sep 2007 15:07:24 +0200 Subject: PRIMITIVE-INVOKE: Make the compiler macro warn the user about unknown methods. darcs-hash:9981c64c80204f96e4ae279dcccf61700125f766 --- Lisp/method-invocation.lisp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'Lisp') diff --git a/Lisp/method-invocation.lisp b/Lisp/method-invocation.lisp index 0426d38..c1742f8 100644 --- a/Lisp/method-invocation.lisp +++ b/Lisp/method-invocation.lisp @@ -254,7 +254,7 @@ Returns: *result* --- the return value of the method invocation. return-value-cell objc-arg-ptrs))) (unless (cffi:null-pointer-p error-cell) - (error (make-instance 'exception :pointer error-cell))) + (error (make-condition 'exception :pointer error-cell))) (case return-type ((id objc-class exception selector) (let ((*skip-retaining* @@ -279,8 +279,14 @@ Returns: *result* --- the return value of the method invocation. (load-time-value (handler-case (selector ,method-name) (serious-condition () - ;; XXX May want to issue a - ;; warning here. + (warn + (make-condition + 'style-warning + :format-control + "~S designates an unknown ~ + method selector." + :format-arguments + (list ,method-name))) ,method-name))) ,return-type ,@args) form)) -- cgit v1.2.3