From: Ian Jackson Subject: Re: [PATCH RFC 5/9] libxl: introduce specific JSON error codes Date: Wed, 24 Jun 2015 16:20:24 +0100 Message-ID: <21898.51896.151187.355136@mariner.uk.xensource.com> References: <1435153656-19485-1-git-send-email-rob.hoes@citrix.com> <1435153656-19485-6-git-send-email-rob.hoes@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z7mTV-0006OP-9c for xen-devel@lists.xenproject.org; Wed, 24 Jun 2015 15:20:29 +0000 In-Reply-To: <1435153656-19485-6-git-send-email-rob.hoes@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Rob Hoes Cc: xen-devel@lists.xenproject.org, euan.harris@citrix.com List-Id: xen-devel@lists.xenproject.org Rob Hoes writes ("[PATCH RFC 5/9] libxl: introduce specific JSON error codes"): > Signed-off-by: Rob Hoes ... > - rc = ERROR_FAIL; > + rc = ERROR_JSON_SET_CONFIG; I think I'd rather have ERROR_USERDATA_ACCESS (see my previous comments about LOCK_FAIL) or maybe ERROR_USERDATA_READ / ERROR_USERDATA_WRITE (where LOCK is the latter). > rc = parse(gc, o, p); > if (rc) { > LOG(ERROR, "unable to convert libxl__json_object to %s. (rc=%d)", type, rc); > - rc = ERROR_FAIL; > + rc = ERROR_JSON_PARSE_CONFIG; This error is an instance of "libxl's system-wide state has become corrupted". Ian.