From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuVPt-0001PH-OJ for qemu-devel@nongnu.org; Thu, 26 Jul 2012 17:16:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SuVPo-00030y-0Q for qemu-devel@nongnu.org; Thu, 26 Jul 2012 17:16:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26440) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuVPn-00030r-Od for qemu-devel@nongnu.org; Thu, 26 Jul 2012 17:16:11 -0400 Date: Thu, 26 Jul 2012 22:16:05 +0100 From: "Richard W.M. Jones" Message-ID: <20120726211605.GA4000@amd.home.annexia.org> References: <87ipdacrhj.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87ipdacrhj.fsf@codemonkey.ws> Subject: Re: [Qemu-devel] Plan for error handling in QMP List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: qemu-devel@nongnu.org On Thu, Jul 26, 2012 at 01:22:15PM -0500, anthony@codemonkey.ws wrote: > We had a violent^Wheated discussion on IRC about how to move forward > with Luiz's proposed error series. I think we reached consensus. This > note attempts to outline that. > > Principles > ---------- > 1. Errors should be free formed strings with a class code > > 2. There should be a small number of class codes (10-15) added > strictly when there are specific users of a code. FWIW this is roughly the same scheme that libguestfs uses to report errors: string + error code. It's been quite successful, and IMHO is much better than the large and ill-defined 'virterror' struct that libvirt returns. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top