[usocket-cvs] r196 - usocket/trunk
ehuelsmann at common-lisp.net
ehuelsmann at common-lisp.net
Mon Jan 22 19:39:13 UTC 2007
Author: ehuelsmann
Date: Mon Jan 22 14:39:13 2007
New Revision: 196
Modified:
usocket/trunk/condition.lisp
usocket/trunk/usocket.lisp
Log:
Raise an error on invalid parameters for a socket.
Modified: usocket/trunk/condition.lisp
==============================================================================
--- usocket/trunk/condition.lisp (original)
+++ usocket/trunk/condition.lisp Mon Jan 22 14:39:13 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/trunk/usocket.lisp
==============================================================================
--- usocket/trunk/usocket.lisp (original)
+++ usocket/trunk/usocket.lisp Mon Jan 22 14:39:13 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))
More information about the usocket-cvs
mailing list