Throw a clearer error message when the socket handle is null
This commit is contained in:
parent
6519b3f246
commit
ddadcbbbd0
1 changed files with 3 additions and 1 deletions
|
|
@ -142,7 +142,9 @@ private[zeromq] class ConcurrentSocketActor(params: Seq[SocketOption]) extends A
|
|||
|
||||
private def socketFromParams() = {
|
||||
require(ZeroMQExtension.check[SocketType.ZMQSocketType](params), "A socket type is required")
|
||||
(params collectFirst { case t: SocketType.ZMQSocketType ⇒ zmqContext.socket(t) } get)
|
||||
(params
|
||||
collectFirst { case t: SocketType.ZMQSocketType ⇒ zmqContext.socket(t) }
|
||||
getOrElse (throw new NoSocketHandleException))
|
||||
}
|
||||
|
||||
private def deserializerFromParams = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue