Skip to contentSkip to conversation

qbus_find_recursive(): the "free slots" constraint needs a dedicated error

RFC Laszlo Ersek 1 participant 1 message Feb 1, 2013 9 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): CAFEAcA-hmYqhgN5Jk76uOvXvyjakg3tfV4QWJ-9f8a0gByfgfg@mail.gmail.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): CAFEAcA-oZt5-RA2=0UrGaAH7+aawxJ1fmRkASvW7i+ZLF8covw@mail.gmail.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): CAFEAcA8-y2bi3otzJ2sRfp7XjwXBBt8f96zVz=bQuZJmLPRp_A@mail.gmail.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): CAFEAcA-XZ7fr6enpQuCP1rO6NUUhpUgKjmPKNOgDLoa2peQ=pA@mail.gmail.com

#9 lore raw
Quoted 11 lines · Peter Maydell

We should only be reporting one error:
"we failed because you asked for this bus and it's full" should override the default "we failed to find this bus". We can fix that by having the recursion stop as soon as we get an error.

I think the QMP caller should also only get one error.

Why does the qmp user need to get QERR_BUS_NOT_FOUND? (it would be an incorrect error anyway in the case where we have the GENERIC_ERROR text, because we have in fact found the bus, we just couldn't use it.)

That's a good clear goal which I can stick to -- let the first / innermost error (the one with the most specific human readable text usually) prevail, no matter the client type.

Thanks!
Laszlo