From: Ian Jackson Subject: Re: [PATCH v2-resend 13/30] libxl: ocaml: propagate the libxl return error code in exceptions Date: Tue, 27 Aug 2013 16:43:18 +0100 Message-ID: <21020.51478.763650.971170@mariner.uk.xensource.com> References: <1377168678-25492-1-git-send-email-rob.hoes@citrix.com> <1377168678-25492-14-git-send-email-rob.hoes@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1377168678-25492-14-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: ian.campbell@citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Rob Hoes writes ("[Xen-devel] [PATCH v2-resend 13/30] libxl: ocaml: propagate the libxl return error code in exceptions"): > -(* @@LIBXL_TYPES@@ *) > +type error = > + Nonspecific | > + Version | > + Fail | > + Ni | > + Nomem | > + Inval | > + Badfail | > + Guest_Timedout | > + Timedout | > + Noparavirt | > + Not_Ready | > + Osevent_Reg_Fail | > + Bufferfull | > + Unknown_Child I'm afraid that you'll have to make the libxl error type an enum, first, to avoid duplicating (pentuplicating(!)) all this. Otherwise it's fine... Ian.