1 ;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*-
3 ;;; --- Gray stream conditions.
6 (in-package :iolib
/streams
)
8 (define-condition hangup
(stream-error)
10 (:report
(lambda (c s
)
11 (format s
"Stream ~S hang up."
12 (stream-error-stream c
))))
13 (:documentation
"Condition signaled when the underlying device of a stream
14 is closed by the remote end while writing to it."))
16 (define-condition no-characters-to-unread
(stream-error)
18 (:report
(lambda (c s
)
19 (format s
"No uncommitted character to unread on stream ~S."
20 (stream-error-stream c
))))
21 (:documentation
"Condition signaled when UNREAD-CHAR is called on a stream either:
22 1) without having been preceded by a READ-CHAR, or
23 2) after a PEEK-CHAR"))