streadway / amqp

Go client for AMQP 0.9.1
http://godoc.org/github.com/streadway/amqp
BSD 2-Clause "Simplified" License
4.88k stars 621 forks source link

No error tag for `_rejectPending` errors #409

Open djmitche opened 5 years ago

djmitche commented 5 years ago

When a connection fails unexpectedly, an error with the text Channel ended, no reply will be forthcoming is sent to all pending requests. However, this error is not tagged in any way, like IllegalOperationError is, and thus can't be preferentially caught and handled without matching the message.

It'd be great to have a specific class for this error. In fact, maybe it could be an IllegalOperationError?