iron_mq_java icon indicating copy to clipboard operation
iron_mq_java copied to clipboard

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

Open chrismyang opened this issue 11 years ago • 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.

chrismyang avatar Jun 17 '13 23:06 chrismyang

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

edsrzf avatar Jun 17 '13 23:06 edsrzf

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

chaplinkyle avatar Jun 13 '14 19:06 chaplinkyle