From d3c538cd8f2a3211a667d2ea5b27f2ad7b9745bd Mon Sep 17 00:00:00 2001 From: Stelian Ionescu Date: Mon, 19 Jan 2009 00:27:41 +0100 Subject: [PATCH] Add condition SUBTYPE-ERROR to base package. --- base/conditions.lisp | 11 +++++++++++ base/pkgdcl.lisp | 1 + 2 files changed, 12 insertions(+) diff --git a/base/conditions.lisp b/base/conditions.lisp index 5f61e47..595989e 100644 --- a/base/conditions.lisp +++ b/base/conditions.lisp @@ -5,6 +5,17 @@ (in-package :iolib.base) +(define-condition subtype-error (error) + ((datum :initarg :type :reader subtype-error-datum) + (expected-supertype :initarg :expected-supertype + :reader subtype-error-expected-supertype)) + (:report + (lambda (condition stream) + (format stream "~S is not a recognizable subtype of ~S" + (subtype-error-datum condition) + (subtype-error-expected-supertype condition))))) + + ;;;------------------------------------------------------------------------- ;;; Bugs ;;;------------------------------------------------------------------------- diff --git a/base/pkgdcl.lisp b/base/pkgdcl.lisp index fc1260d..bdf4284 100644 --- a/base/pkgdcl.lisp +++ b/base/pkgdcl.lisp @@ -11,6 +11,7 @@ (:export ;; Conditions #:bug #:iolib-bug + #:subtype-error #:subtype-error-datum #:subtype-error-expected-supertype ;; Debugging #:*safety-checks* #:debug-only #:debug-only* -- 2.11.4.GIT