[glibmm] _WRAP_VFUNC: Prepend @throws clause to vfuncs that throw errors.



commit 21d6d4df0728a842c17dcbc00b18b647b817b670
Author: Josà Alburquerque <jaalburqu svn gnome org>
Date:   Wed Sep 19 14:57:31 2012 -0400

    _WRAP_VFUNC: Prepend @throws clause to vfuncs that throw errors.
    
    	* tools/pm/Output.pm (output_wrap_vfunc_h): Prepend a Doxygen @throws
    	clause to the declaration of virtual functions that throw Glib::Error.

 ChangeLog          |    7 +++++++
 tools/pm/Output.pm |    7 +++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b7ba3fe..712fb61 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-09-19  Josà Alburquerque  <jaalburquerque gmail com>
+
+	_WRAP_VFUNC: Prepend @throws clause to vfuncs that throw errors.
+
+	* tools/pm/Output.pm (output_wrap_vfunc_h): Prepend a Doxygen @throws
+	clause to the declaration of virtual functions that throw Glib::Error.
+
 2012-09-18  Josà Alburquerque  <jaalburqu svn gnome org>
 
 	Gio::DBus::Connection: Add the call_[finish|sync]() with UnixFDLists.
diff --git a/tools/pm/Output.pm b/tools/pm/Output.pm
index a820d24..916b18c 100644
--- a/tools/pm/Output.pm
+++ b/tools/pm/Output.pm
@@ -118,6 +118,13 @@ sub output_wrap_vfunc_h($$$$$$)
 #   );
 #  $self->append($str);
 
+  # Prepend a Doxygen @throws directive to the declaration if the virtual
+  # function throws an error.
+  if($$objCDefsFunc{throw_any_errors})
+  {
+    $self->append('/// @throws Glib::Error.' . "\n");
+  }
+
   my $cppVfuncDecl = "virtual " . $$objCppfunc{rettype} . " " . $$objCppfunc{name} . "(" . $objCppfunc->args_types_and_names() . ")";
   if($objCppfunc->get_is_const())
   {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]