From: Didier 'Ptitjes Date: Sat, 21 Mar 2009 05:05:03 +0000 (+0100) Subject: GIR writer: Generate throws attribute X-Git-Tag: 0.7.2~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e2f3ff6d353936748e9d0d5a8441af618980339;p=thirdparty%2Fvala.git GIR writer: Generate throws attribute Generate throws attribute on constructors, methods and callbacks. Signed-off-by: Didier 'Ptitjes --- diff --git a/gobject/valagirwriter.vala b/gobject/valagirwriter.vala index 53ef7eb1e..c6bad7a19 100644 --- a/gobject/valagirwriter.vala +++ b/gobject/valagirwriter.vala @@ -469,6 +469,9 @@ public class Vala.GIRWriter : CodeVisitor { write_indent (); stream.printf ("\n"); indent++; @@ -514,6 +517,9 @@ public class Vala.GIRWriter : CodeVisitor { } else { stream.printf (" c:identifier=\"%s\"", m.get_cname ()); } + if (m.tree_can_fail) { + stream.printf (" throws=\"1\""); + } stream.printf (">\n"); indent++; @@ -542,6 +548,9 @@ public class Vala.GIRWriter : CodeVisitor { write_indent (); stream.printf ("\n"); indent++;