summaryrefslogtreecommitdiff
path: root/Lisp/conditions.lisp
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2007-09-21 16:17:40 +0200
committerMatthias Benkard <code@mail.matthias.benkard.de>2007-09-21 16:17:40 +0200
commit17ee7b8790aff3efe19551796efec889e9d0b51d (patch)
tree088e7201ad2c1cbda86c8cfd2ff34f25c9b9a283 /Lisp/conditions.lisp
parent4167e6b9ec7c144bf259a820d7c958ecf7632c3f (diff)
Add condition classes NO-SUCH-SELECTOR and MESSAGE-NOT-UNDERSTOOD.
darcs-hash:e86722d8de9c97edf6ee9665423d57b0239fe910
Diffstat (limited to 'Lisp/conditions.lisp')
-rw-r--r--Lisp/conditions.lisp25
1 files changed, 25 insertions, 0 deletions
diff --git a/Lisp/conditions.lisp b/Lisp/conditions.lisp
new file mode 100644
index 0000000..839838e
--- /dev/null
+++ b/Lisp/conditions.lisp
@@ -0,0 +1,25 @@
+(in-package #:mulk.objective-cl)
+
+
+(define-condition no-such-selector (error)
+ ((designator :initarg :designator
+ :reader rejected-selector-designator))
+ (:report (lambda (condition stream)
+ (with-slots (designator) condition
+ (format stream
+ "~S does not designate a known selector."
+ designator)))))
+
+
+(define-condition message-not-understood (error)
+ ((selector :initarg :selector
+ :reader rejected-selector)
+ (class :initarg :class
+ :reader rejecting-class))
+ (:report (lambda (condition stream)
+ (with-slots (selector class) condition
+ (format stream
+ "The Objective-C class ~S does not understand the ~
+ message ~S."
+ class
+ selector)))))