Received: from eggs.gnu.org ([2001:4830:134:3::10]:41862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2CmX-00041R-L2 for qemu-devel@nongnu.org; Tue, 09 Jun 2015 02:13:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z2CmU-0007M6-E0 for qemu-devel@nongnu.org; Tue, 09 Jun 2015 02:13:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58403) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2CmU-0007Ky-91 for qemu-devel@nongnu.org; Tue, 09 Jun 2015 02:13:02 -0400 From: Markus Armbruster References: <1433789877-6950-1-git-send-email-armbru@redhat.com> <1433789877-6950-8-git-send-email-armbru@redhat.com> <5575F534.5020004@redhat.com> Date: Tue, 09 Jun 2015 08:12:58 +0200 In-Reply-To: <5575F534.5020004@redhat.com> (Eric Blake's message of "Mon, 08 Jun 2015 14:04:04 -0600") Message-ID: <87wpzdxvdh.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 7/7] qdev-monitor: Propagate errors through qdev_device_add() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: pbonzini@redhat.com, kraxel@redhat.com, qemu-devel@nongnu.org, afaerber@suse.de Eric Blake writes: > On 06/08/2015 12:57 PM, Markus Armbruster wrote: >> Signed-off-by: Markus Armbruster >> --- >> include/monitor/qdev.h | 2 +- >> qdev-monitor.c | 36 +++++++++++++++--------------------- >> vl.c | 7 +++++-- >> 3 files changed, 21 insertions(+), 24 deletions(-) >> > >> if (!object_dynamic_cast(OBJECT(bus), dc->bus_type)) { >> - qerror_report(ERROR_CLASS_GENERIC_ERROR, >> - "Device '%s' can't go on a %s bus", >> - driver, object_get_typename(OBJECT(bus))); >> + error_setg(errp, "Device '%s' can't go on a %s bus", >> + driver, object_get_typename(OBJECT(bus))); > > Pre-existing - "a '%s' bus" or "an %s bus" might look a bit nicer than > "a %s bus" for some bus names (depends on the initial sound during > pronunciation). Certainly a nightmare for translation rules to other > languages that don't follow English rules on indefinite article usage. For a real nightmare, try following every other language's rules[*]. Not following English rules will feel like a lullaby after that. > Maybe some word-smithing can avoid the indefinite article altogether? Do you think "Device '%s' can't go on %s bus" would be an improvement? > But not something I care about enough to hold up the series. > > Reviewed-by: Eric Blake Thanks! [*] http://search.cpan.org/dist/Locale-Maketext/lib/Locale/Maketext/TPJ13.pod?#A_Localization_Horror_Story:_It_Could_Happen_To_You