Basic development mostly done, need to do HTTP functionality now.

We might deprecate CLASH-SYS (both package and system) and incorporate
that into the driver itself.  For now we've removed all dependencies.
This commit is contained in:
1999-05-25 10:25:20 +00:00
parent 7b11e26c3e
commit 88cdc8f6c8
4 changed files with 836 additions and 2 deletions

42
src/main/conditions.cl Normal file
View File

@ -0,0 +1,42 @@
;;;; CLASH --- The Common Lisp Adaptable Simple HTTP server
;;;; This is copyrighted software. See documentation for terms.
;;;;
;;;; conditions.cl --- CLASH- and HTTP-specific conditions
;;;;
;;;; Checkout Tag: $Name$
;;;; $Id$
(in-package :CLASH)
;;;; %File Description:
;;;;
;;;; This file defines a number of CLASH- and/or HTTP-specific
;;;; conditions, which are used in the rest of CLASH for error
;;;; signalling and handling.
;;;;
(defun report-clash-error
(condition stream &optional (fmt "Unspecified error.") args)
(format stream
"CLASH error: ~?~& Possible HTTP status code: ~D (~A)."
fmt args
(clash-error-code condition)
(HTTP-code-description (clash-error-code condition))))
(define-condition clash-error (error)
((code :initarg :code :initform +HTTP-Code-Internal-Server-Error+
:type fixnum
:reader clash-error-code
#+NIL
:documentation
#+NIL
"HTTP status code that might be returned to the client, if
this makes sense."))
(:report report-clash-error))
(define-condition simple-clash-error (simple-condition clash-error)
()
(:report (lambda (condition stream)
(report-clash-error condition stream
(simple-condition-format-control condition)
(simple-condition-format-arguments condition)))))