diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-09-17 15:07:24 +0200 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-09-17 15:07:24 +0200 |
commit | 924df92528bfe9b8dce833f04d1d809a5a8e1220 (patch) | |
tree | 250b35873fb03c3b528346810783459abbc4600c | |
parent | c3f89b6967800bfdb8d4462d2e91d3bc2e3796fa (diff) |
PRIMITIVE-INVOKE: Make the compiler macro warn the user about unknown methods.
darcs-hash:9981c64c80204f96e4ae279dcccf61700125f766
-rw-r--r-- | Lisp/method-invocation.lisp | 12 |
1 files changed, 9 insertions, 3 deletions
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)) |