summaryrefslogtreecommitdiff
path: root/Lisp/conditions.lisp
diff options
context:
space:
mode:
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)))))