[seed] Exception documentation. GtkDoc is losing some of



commit 7ba93ef1049807e2c971b56d2aaeea75516a8823
Author: Tim Horton <hortont424 gmail com>
Date:   Mon Mar 9 22:18:23 2009 -0400

    Exception documentation. GtkDoc is losing some of my docs on seed_make_exception for some reason. Also, somehow some of our headers are out of sync (variable-name-wise) with implementation files.
---
 libseed/seed-exceptions.c |   65 +++++++++++++++++++++++++++++++++++++++++++++
 libseed/seed.h            |   14 +++++-----
 2 files changed, 72 insertions(+), 7 deletions(-)

diff --git a/libseed/seed-exceptions.c b/libseed/seed-exceptions.c
index be948f8..a050842 100644
--- a/libseed/seed-exceptions.c
+++ b/libseed/seed-exceptions.c
@@ -18,6 +18,19 @@
 #include "seed-private.h"
 #include <string.h>
 
+/**
+ * seed_make_exception:
+ * @ctx: A #SeedContext.
+ * @exception: A reference to a #SeedException in which to store the exception.
+ * @name: The #gchar* representing the exception name.
+ * @message: The #gchar* representing the details of the exception.
+ *
+ * The line number and file name of the exception created will be undefined.
+ *
+ * The runtime documentation contains a list of names of built-in exceptions,
+ * and should eventually be merged in here.
+ *
+ */
 void
 seed_make_exception (JSContextRef ctx,
 		     JSValueRef * exception,
@@ -52,6 +65,15 @@ seed_make_exception (JSContextRef ctx,
   JSStringRelease (js_message);
 }
 
+/**
+ * seed_make_exception:
+ * @ctx: A #SeedContext.
+ * @exception: A reference to a #SeedException in which to store the exception.
+ * @error: A #GError* from which to copy the properties of the exception.
+ *
+ * Generates @exception with the name and description of @error.
+ *
+ */
 void
 seed_make_exception_from_gerror (JSContextRef ctx,
 				 JSValueRef * exception, GError * error)
@@ -77,6 +99,14 @@ seed_make_exception_from_gerror (JSContextRef ctx,
   g_string_free (string, TRUE);
 }
 
+/**
+ * seed_exception_get_name:
+ * @ctx: A #SeedContext.
+ * @exception: A reference to a #SeedException.
+ *
+ * Return value: A #gchar* representing the name of @exception.
+ *
+ */
 gchar *
 seed_exception_get_name (JSContextRef ctx, JSValueRef e)
 {
@@ -89,6 +119,14 @@ seed_exception_get_name (JSContextRef ctx, JSValueRef e)
   return seed_value_to_string (ctx, name, 0);
 }
 
+/**
+ * seed_exception_get_message:
+ * @ctx: A #SeedContext.
+ * @exception: A reference to a #SeedException.
+ *
+ * Return value: A #gchar* representing the detailed message of @exception.
+ *
+ */
 gchar *
 seed_exception_get_message (JSContextRef ctx, JSValueRef e)
 {
@@ -101,6 +139,15 @@ seed_exception_get_message (JSContextRef ctx, JSValueRef e)
   return seed_value_to_string (ctx, name, 0);
 }
 
+/**
+ * seed_exception_get_line:
+ * @ctx: A #SeedContext.
+ * @exception: A reference to a #SeedException.
+ *
+ * Return value: A #guint representing the line number from which @exception
+ *               was thrown.
+ *
+ */
 guint
 seed_exception_get_line (JSContextRef ctx, JSValueRef e)
 {
@@ -112,6 +159,15 @@ seed_exception_get_line (JSContextRef ctx, JSValueRef e)
   return seed_value_to_uint (ctx, line, 0);
 }
 
+/**
+ * seed_exception_get_file:
+ * @ctx: A #SeedContext.
+ * @exception: A reference to a #SeedException.
+ *
+ * Return value: A #gchar* representing the name of the file from which
+ *               @exception was thrown.
+ *
+ */
 gchar *
 seed_exception_get_file (JSContextRef ctx, JSValueRef e)
 {
@@ -123,6 +179,15 @@ seed_exception_get_file (JSContextRef ctx, JSValueRef e)
   return seed_value_to_string (ctx, line, 0);
 }
 
+/**
+ * seed_exception_to_string:
+ * @ctx: A #SeedContext.
+ * @exception: A reference to a #SeedException.
+ *
+ * Return value: A #gchar* representing the name, detailed message, line number,
+ *               and file name of @exception.
+ *
+ */
 gchar *
 seed_exception_to_string (JSContextRef ctx, JSValueRef e)
 {
diff --git a/libseed/seed.h b/libseed/seed.h
index e47ad51..847b701 100644
--- a/libseed/seed.h
+++ b/libseed/seed.h
@@ -82,13 +82,13 @@ SeedScript *seed_make_script (SeedContext ctx,
 			      gint line_number);
 SeedScript *seed_script_new_from_file (SeedContext ctx, gchar * file);
 SeedException seed_script_exception (SeedScript * s);
-void seed_make_exception (SeedContext ctx, SeedException e,
-			  gchar * name, gchar * message);
-gchar *seed_exception_get_name (SeedContext ctx, SeedException e);
-gchar *seed_exception_get_message (SeedContext ctx, SeedException e);
-guint seed_exception_get_line (SeedContext ctx, SeedException e);
-gchar *seed_exception_get_file (SeedContext ctx, SeedException e);
-gchar *seed_exception_to_string (SeedContext ctx, SeedException e);
+void seed_make_exception (SeedContext ctx, SeedException exception,
+			  const gchar * name, const gchar * message);
+gchar *seed_exception_get_name (SeedContext ctx, SeedException exception);
+gchar *seed_exception_get_message (SeedContext ctx, SeedException exception);
+guint seed_exception_get_line (SeedContext ctx, SeedException exception);
+gchar *seed_exception_get_file (SeedContext ctx, SeedException exception);
+gchar *seed_exception_to_string (SeedContext ctx, SeedException exception);
 
 SeedValue seed_evaluate (SeedContext ctx, SeedScript * s, SeedObject this);
 



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