gjs r12 - trunk/gjs



Author: tko
Date: Sun Oct 12 14:41:26 2008
New Revision: 12
URL: http://svn.gnome.org/viewvc/gjs?rev=12&view=rev

Log:
gjs: ensure GError is set on failure

	* gjs/context.c (gjs_context_eval): ensure GError is set on
	failure even when there's no exception. Avoids crashing
	gjs-console when it tries to print the error message.

Modified:
   trunk/gjs/context.c

Modified: trunk/gjs/context.c
==============================================================================
--- trunk/gjs/context.c	(original)
+++ trunk/gjs/context.c	Sun Oct 12 14:41:26 2008
@@ -529,6 +529,10 @@
         } else {
             gjs_debug(GJS_DEBUG_CONTEXT,
                       "JS_EvaluateScript() failed but no exception message?");
+            g_set_error(error,
+                        GJS_ERROR,
+                        GJS_ERROR_FAILED,
+                        "JS_EvaluateScript() failed but no exception message?");
         }
 
         success = FALSE;



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