Peter Maydell <peter.mayd...@linaro.org> writes: > On 22 June 2015 at 10:12, Markus Armbruster <arm...@redhat.com> wrote: >> We generally do not end error messages with a period. >> >> The message for auto_claimed drives is of the form >> >> LOCATION: This went wrong. Advice on how to fix it. >> >> All in one awfully long line. A friendler format is >> >> LOCATION: This went wrong >> Advice on how to fix it. >> >> Unfortunately, the Error API doesn't support that. [...] >> I think we should just bite the bullet and extend Error to support >> additional helpful information for humans. > > ...I thought all of the string was already just helpful information > for humans? I certainly hope we aren't expecting anybody to parse it...
My point is qemu-system-arm: -device virtio-blk-pci,drive=foo: Property 'virtio-blk-device can't be set to drive ID 'foo'; that drive has been automatically connected to another device. Use if=none if you do not want that automatic connection. is considerable less readable than something like qemu-system-arm: -device virtio-blk-pci,drive=foo: Property 'virtio-blk-device can't take value 'foo', it's in use The drive with ID 'foo' has been automatically connected to another device. Use if=none if you do not want that automatic connection. Error messages should be short and to the point. We actually enforce a "no newline in error messages" policy there. Some errors can use a more verbose explanation, or hints on how to avoid the error, or hints on how to find out more on what exactly went wrong". Such explanations should be sensibly formatted, not crammed into the same line as the error message. Whether the additional explanation should also be transmitted over QMP is open for debate. Note: my example is just for demonstrating layout and style. No claim to perfection for the actual text.