GNOME Bugzilla – Bug 625837
Add support for parsing error domains from GIR files
Last modified: 2010-08-12 19:26:17 UTC
Created attachment 166980 [details] [review] Add support for parsing error domains from GIR files Attached is an *unfinished* patch to add support for parsing error domains from GIR files. It converts every <enumeration> element which has a glib:error-quark attribute to a Vala errordomain rather than a normal enum. Unfortunately, it doesn't quite work. When creating the telepathy-glib bindings (specifically, when parsing the TpError enumeration shown below) it gives the following error: error: The type name `Error' could not be found Generation failed: 1 error(s), 0 warning(s) I have no idea how to fix this. The error isn't the most helpful either. I hope it's not much work to fix up the patch, since the bulk of the work is done and it's probably just some type registration issue in the parser which I haven't figured out. :-( Here's the GIR extract for TpError: <enumeration name="Error" c:type="TpError" glib:error-quark="tp_error_quark"> <doc xml:whitespace="preserve">Enumerated type representing the Telepathy D-Bus errors.</doc> <member name="network_error" value="0" c:identifier="TP_ERROR_NETWORK_ERROR"/> <member name="not_implemented" value="1" c:identifier="TP_ERROR_NOT_IMPLEMENTED"/> <member name="invalid_argument" value="2" c:identifier="TP_ERROR_INVALID_ARGUMENT"/> </enumeration>
commit 648cf84c988cb456d98637601dcac096ba125ac3 Author: Philip Withnall <philip.withnall@collabora.co.uk> Date: Mon Aug 2 15:51:46 2010 +0100 girparser: Add support for parsing error domains Fixes bug 625837.