jakubkulhan / bunny

Performant pure-PHP AMQP (RabbitMQ) sync/async (ReactPHP) library
MIT License
706 stars 102 forks source link

Add description when channel.close is received #85

Closed enumag closed 4 years ago

enumag commented 5 years ago

After some refactoring my eventloop started throwing this error:

  [Bunny\Exception\ChannelException]                              
  Unhandled method frame Bunny\Protocol\MethodChannelCloseFrame.  

After some googling I found this commit which seems to solve a similar issue: https://github.com/jakubkulhan/bunny/commit/ed7018d7ac98af42e0a1412748d6f64328817179

So I tried to use the same idea to add more error description here. With my change the error changed:

  [Bunny\Exception\ChannelException (406)]                                   
  Connection closed by server: PRECONDITION_FAILED - unknown delivery tag 1  

Of course I don't really know what this error is either yet, but at least it's more specific than the old one and should lead me somewhere - I hope.

enumag commented 4 years ago

@WyriHaximus If https://github.com/jakubkulhan/bunny/commit/ed7018d7ac98af42e0a1412748d6f64328817179 contained a test then I would have done it already. Since it doesn't, I have no idea how to write it and can't really spend the time to figure it out. So until there is a test for the referenced commit, the answer is no.