Browse files

Fix incorrect re-throwing of error condition.

This was passing a cons cell as the first argument to `error', which
expects a format string and thus throws an error itself.  Use the
re-throw idiom suggested by

NB: at first glance, `(error (cdr err))' is preferable as it is more
succinct.  However, the generic form will keep working should the
CONDITION-NAME in the condition-case form ever be changed.
  • Loading branch information...
jscheid committed Aug 4, 2012
1 parent aeda944 commit 8513a7e38d7bf3538d235668ec16081cbd561460
Showing with 1 addition and 1 deletion.
  1. +1 −1 websocket.el
@@ -582,7 +582,7 @@ connection is invalid, the connection will be closed."
(websocket-verify-headers websocket text))
(websocket-close websocket)
- (error err)))
+ (signal (car err) (cdr err))))
(setf (websocket-ready-state websocket) 'open)
(websocket-try-callback 'websocket-on-open 'on-open websocket))
(when (eq 'open (websocket-ready-state websocket))

0 comments on commit 8513a7e

Please sign in to comment.