From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvofC-0002FI-0g for qemu-devel@nongnu.org; Mon, 09 Nov 2015 10:47:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZvofB-00024K-13 for qemu-devel@nongnu.org; Mon, 09 Nov 2015 10:47:21 -0500 Received: from mail-yk0-x231.google.com ([2607:f8b0:4002:c07::231]:36701) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvofA-000245-MW for qemu-devel@nongnu.org; Mon, 09 Nov 2015 10:47:20 -0500 Received: by ykba4 with SMTP id a4so270849949ykb.3 for ; Mon, 09 Nov 2015 07:47:20 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <87oaf3jww7.fsf@blackfin.pond.sub.org> References: <1446909925-12201-1-git-send-email-drjones@redhat.com> <87twovpqg1.fsf@blackfin.pond.sub.org> <87oaf3jww7.fsf@blackfin.pond.sub.org> From: Peter Maydell Date: Mon, 9 Nov 2015 15:47:00 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH] hw/arm/virt: error_report cleanups List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Andrew Jones , qemu-arm@nongnu.org, QEMU Developers On 9 November 2015 at 10:21, Markus Armbruster wrote: > Peter Maydell writes: > >> On 9 November 2015 at 07:44, Markus Armbruster wrote: >>> For consistency, error messages should be a phrase, not a full sentence, >>> let alone a paraphraph. >> >> This is in direct conflict with wanting them to be actually useful >> to users :-( > > I appreciate your drive for useful error messages. Judging from the > error messages we got, it's a rare thing. > > Let me rephrase. The error message proper (the thing emitted by > error_report()) should be a phrase, and it should be short and to the > point. It can be followed by hints. Compare: > > qemu-system-arm: Unable to determine GIC version supported by host. KVM acceleration is probably not supported. > > and > > qemu-system-arm: Unable to determine GIC version supported by host > KVM acceleration is probably not supported > > I prefer the latter. The error message proper is short and to the > point. The hint points to the most probable cause. Sensible line > lengths. I agree that the latter is preferable; I had been under the impression that we weren't allowed to use newlines in error messages, though... > By the way, the error.h API supports this message + hints convention > since commit 50b7b00. Thanks, I had missed this useful improvement to the API. How does it work in cases like this where we don't have an Error* to fill in? thanks -- PMM