1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; indent-tabs-mode: nil -*-
3 ;;; --- Error conditions.
6 (in-package :iolib.base
)
8 (define-condition subtype-error
(error)
9 ((datum :initarg
:type
:reader subtype-error-datum
)
10 (expected-supertype :initarg
:expected-supertype
11 :reader subtype-error-expected-supertype
))
13 (lambda (condition stream
)
14 (format stream
"~S is not a recognizable subtype of ~S"
15 (subtype-error-datum condition
)
16 (subtype-error-expected-supertype condition
)))))
19 ;;;-------------------------------------------------------------------------
21 ;;;-------------------------------------------------------------------------
23 (define-condition iolib-bug
(error)
24 ((message :initarg
:message
:reader iolib-bug-message
))
26 (lambda (condition stream
)
27 (format stream
"~A.~%This seems to be a bug in IOlib. ~
28 Please report it to iolib-devel@common-lisp.net"
29 (iolib-bug-message condition
)))))
31 (defun bug (control &rest args
)
32 (error 'iolib-bug
:message
(format nil
"~?" control args
)))