iron-io/iron_mq_java

Queue.get() NPEs if queue doesn't exist

chrismyang opened this issue · 2 comments

If a queue doesn't exist, Queue.get() throws an NPE – which is not a very helpful error. Actually, the semantics of queue existence is a little slippery, because from the API, it queues are treated sort of like namespaces for messages, rather than first-class things themselves (for example, you can't really create a queue other than posting a message to a queue).

At the very least, seems like you should replace the NPE with a more helpful message.

Thanks, I agree a different exception would be more helpful.

Today it doesn't throw a NPE, it throws an EmptyQueueException.