File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33
44use FuseSource \Stomp \Stomp as FuseStomp ;
55
6+ use BadMethodCallException ;
67use PHPQueue \Exception \BackendException ;
78use PHPQueue \Exception \JobNotFoundException ;
89use PHPQueue \Interfaces \FifoQueueStore ;
@@ -113,7 +114,10 @@ protected function readFrame($properties = null)
113114 if ($ properties === null ) {
114115 $ properties = array ('ack ' => 'client ' );
115116 }
116- $ this ->getConnection ()->subscribe ($ this ->queue_name , $ properties );
117+ $ result = $ this ->getConnection ()->subscribe ($ this ->queue_name , $ properties );
118+ if (!$ result ) {
119+ throw new BackendException ("No response when subscribing to queue {$ this ->queue_name }" );
120+ }
117121 if ($ this ->read_timeout ) {
118122 $ this ->getConnection ()->setReadTimeout ($ this ->read_timeout );
119123 }
@@ -139,6 +143,6 @@ protected function readFrame($properties = null)
139143
140144 public function clear ($ key =null )
141145 {
142- throw new Exception ('Not implemented. ' );
146+ throw new BadMethodCallException ('Not implemented. ' );
143147 }
144148}
You can’t perform that action at this time.
0 commit comments