Author: ehuelsmann Date: Sun Jul 27 12:59:36 2008 New Revision: 392
Modified: usocket/trunk/condition.lisp usocket/trunk/package.lisp Log: Conditions soon to be used (not only for backward compat).
Modified: usocket/trunk/condition.lisp ============================================================================== --- usocket/trunk/condition.lisp (original) +++ usocket/trunk/condition.lisp Sun Jul 27 12:59:36 2008 @@ -5,12 +5,34 @@
(in-package :usocket)
-;; Condition raised by operations with unsupported arguments +;; Condition signalled by operations with unsupported arguments ;; For trivial-sockets compatibility.
-(define-condition unsupported (error) - ((feature :initarg :feature :reader unsupported-feature))) +(define-condition insufficient-implementation (error) + ((feature :initarg :feature :reader feature) + (function :initarg :function :reader function)) + (:documentation "The ancestor of all errors usocket may generate +because of insufficient support from the underlying implementation +with respect to the arguments given to `function'. + +One call may signal several errors, if the caller allows processing +to continue. +")) + +(define-condition unsupported (insufficient-implementation) + ((minimum :initarg :minimum :reader minimum + :documentation "Indicates the minimal version of the +implementation required to support the requested feature.")) + (:documentation "Signalled when the underlying implementation +doesn't allow supporting the requested feature.
+When you see this error, go bug your vendor/implementation developer!")) + +(define-condition unimplemented (insufficient-implementation) + () + (:documentation "Signalled if a certain feature might be implemented, +based on the features of the underlying implementation, but hasn't +been implemented yet."))
;; Conditions raised by sockets operations
Modified: usocket/trunk/package.lisp ============================================================================== --- usocket/trunk/package.lisp (original) +++ usocket/trunk/package.lisp Sun Jul 27 12:59:36 2008 @@ -56,6 +56,7 @@ #:ip-from-octet-buffer
#:with-mapped-conditions + #:socket-condition ; conditions #:ns-condition #:socket-error ; errors @@ -63,5 +64,10 @@ #:unknown-condition #:ns-unknown-condition #:unknown-error - #:ns-unknown-error))) + #:ns-unknown-error + + #:insufficient-implementation ; conditions regarding usocket support level + #:unsupported + #:unimplemented + )))