Skip to content

Commit

Permalink
Moved condition definitions from conditions.lisp to handshake.lisp.
Browse files Browse the repository at this point in the history
  • Loading branch information
flambard committed Nov 10, 2012
1 parent b0898aa commit 281fab8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/conditions.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@
((comment :reader comment :initarg :comment))
(:documentation "The signaling function is not implemented yet."))

(define-condition try-again ()
((reason :reader reason :initarg :reason))
(:documentation "This condition is signaled when trying to connect to a remote node that is busy."))

(defun try-again-condition-p (condition)
(typep condition 'try-again))

(define-condition handshake-failed-error (error)
((reason :reader reason :initarg :reason))
(:documentation "This error is signaled if the handshake during connection to a remote node fails."))

(define-condition connection-closed-error (error)
;; END-OF-FILE
()
(:documentation "This error is signaled when trying to read from a socket stream that has been closed."))

(define-condition malformed-message-error (error)
((bytes :reader bytes :initarg :bytes))
(:documentation "This error is signaled when a protocol message is malformed."))
Expand Down
16 changes: 16 additions & 0 deletions src/handshake.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@
(defconstant +dflag-dist-hdr-atom-cache+ #x2000)
(defconstant +dflag-small-atom-tags+ #x4000)

(define-condition try-again ()
((reason :reader reason :initarg :reason))
(:documentation "This condition is signaled when trying to connect to a remote node that is busy."))

(defun try-again-condition-p (condition)
(typep condition 'try-again))

(define-condition connection-closed-error (error)
;; END-OF-FILE
()
(:documentation "This error is signaled when trying to read from a socket stream that has been closed."))

(define-condition handshake-failed-error (error)
((reason :reader reason :initarg :reason))
(:documentation "This error is signaled if the handshake during connection to a remote node fails."))


;;;
;;; Name message
Expand Down

0 comments on commit 281fab8

Please sign in to comment.