Commit 3e2f3ff6 authored by Didier 'Ptitjes's avatar Didier 'Ptitjes Committed by Jürg Billeter

GIR writer: Generate throws attribute

Generate throws attribute on constructors, methods and callbacks.
Signed-off-by: default avatarDidier 'Ptitjes <ptitjes@free.fr>
parent c8abdb70
......@@ -469,6 +469,9 @@ public class Vala.GIRWriter : CodeVisitor {
write_indent ();
stream.printf ("<callback name=\"%s\"", cb.name);
stream.printf (" c:type=\"%s\"", cb.get_cname ());
if (cb.tree_can_fail) {
stream.printf (" throws=\"1\"");
}
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 ("<constructor name=\"%s\" c:identifier=\"%s\"", m.name, m.get_cname ());
if (m.tree_can_fail) {
stream.printf (" throws=\"1\"");
}
stream.printf (">\n");
indent++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment