Author: ehuelsmann Date: Sun Feb 25 18:09:34 2007 New Revision: 200
Modified: usocket/branches/0.3.x/condition.lisp usocket/branches/0.3.x/usocket.lisp Log: Merge r196 from trunk: Raise an error on invalid parameters for a socket.
Modified: usocket/branches/0.3.x/condition.lisp ============================================================================== --- usocket/branches/0.3.x/condition.lisp (original) +++ usocket/branches/0.3.x/condition.lisp Sun Feb 25 18:09:34 2007 @@ -77,7 +77,9 @@ host-down-error host-unreachable-error shutdown-error - timeout-error) + timeout-error + invalid-socket-error + invalid-socket-stream-error) (socket-error))
(define-condition unknown-error (socket-error)
Modified: usocket/branches/0.3.x/usocket.lisp ============================================================================== --- usocket/branches/0.3.x/usocket.lisp (original) +++ usocket/branches/0.3.x/usocket.lisp Sun Feb 25 18:09:34 2007 @@ -48,11 +48,17 @@
(defun make-socket (&key socket) "Create a usocket socket type from implementation specific socket." + (unless socket + (error 'invalid-socket)) (make-stream-socket :socket socket))
(defun make-stream-socket (&key socket stream) "Create a usocket socket type from implementation specific socket and stream objects." + (unless socket + (error 'invalid-socket-error)) + (unless stream + (error 'invalid-socket-stream-error)) (make-instance 'stream-usocket :socket socket :stream stream))