I don't know how we got the NotAttachedException. One of the other coders on my team discovered it. I have the chat logs, and but they're not very helpful.
Me: No. Any idea what's different? You're running on what machine?
Him: it happened to two machines at once
Him: oh, maybe a queue overflowed and it's just a different error message than I'm used to from the qpid messaging library
Him: maybe it's idsconnecting from the broker when it sees the queue is full?
Him: because sessionDisconnected is a pretty different sounding exception from ueueOverFlow or whatever it is we're currently catching
This was a month ago, and we were performing some stress tests on our code. And our code isn't currently catching Detached anymore, so there's no help there.
I'd suggest leaving the patch in. If you/we ever figure out what threw it, and properly translate it, we can add a patch to also convert that. There's no reason you can't have multiple C++ exception types translate to the same Python type. It's not ideal, but it's possible.
The only concern would be if the NotAttachedException shouldn't be translated to a Detached in a signficant number of cases.
Another option is to include the qpid::framing header in python.i, not qpid.i, but I figured other bindings should eventually do the same translations. It does give you one less place to change code, should you ever catch and translate the exception in the qpid::messaging space.
I vote for putting it in.
If I have time, I'll work on breaking that patch up so the Detached exception stuff is separate from the other three. (Ironically, I think it was multiple changes originally, that I rebased into one for your convenience. )