]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
doclet/gtkdoc: Implement @throws taglet in the gtk-doc comment converter
authorPhilip Withnall <philip@tecnocode.co.uk>
Tue, 14 Aug 2012 21:58:13 +0000 (23:58 +0200)
committerFlorian Brosch <flo.brosch@gmail.com>
Tue, 14 Aug 2012 21:58:13 +0000 (23:58 +0200)
This now appends a paragraph to the gtk-doc comment explaining that
particular throw value and description.

src/doclets/gtkdoc/commentconverter.vala

index b585a0d8c4f4f877266ee61ad37c1eba98ccbd74..3b90d482be371c6b509d76d410e05246589fd83a 100644 (file)
@@ -277,6 +277,10 @@ public class Gtkdoc.CommentConverter : ContentVisitor {
                        this.see_also = see_also;
                } else if (t is Taglets.Link) {
                        ((Taglets.Link)t).produce_content().accept (this);
+               } else if (t is Taglets.Throws) {
+                       var taglet = (Taglets.Throws) t;
+                       var link = get_docbook_link (taglet.error_domain) ?? taglet.error_domain_name;
+                       old_builder.append_printf ("\n<para>%s will be returned in @error %s</para>", link, current_builder.str);
                } else {
                        reporter.simple_warning ("GtkDoc: warning: Taglet not supported"); // TODO
                }