|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] [PATCH 6/9] QError: Add qdev not found error |
Date: | Thu, 15 Oct 2009 15:57:49 -0500 |
User-agent: | Thunderbird 2.0.0.23 (X11/20090825) |
Aside from that, we should certainly be able to change the pretty text, for example, to provide additional clarification to the user. The machine-interpreted code, on the other hand, wouldn't change.How do you plan to do it in the design you're proposing? If you use the text from qemu_error() to build the user and protocol outputs, then you can't change it.Today it looks like this: C: open host USB device foo S: error 404, host USB device foo is already open Tomorrow it could look like this: C: open host USB device foo S: error 404, host USB device foo is already open by PID 27
What's tough about this sort of error handling is that it's not conducive to localization. It's not unusual for the server to have a different locale than the client so you really need the client to be able to translate error messages into meaningful messages in the client locale.
This is the typical argument for highly structured error reporting. -- Regards, Anthony Liguori
[Prev in Thread] | Current Thread | [Next in Thread] |