anoter oaf patch ...



Hi there,

	It'd be great if you could review the last patch I posted to make
oaf HEAD work with ORBit2 nicely, however - it'd be good to get this in
too:

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/oaf/ChangeLog,v
retrieving revision 1.126.2.51
diff -u -r1.126.2.51 ChangeLog
--- ChangeLog	2001/04/21 21:01:44	1.126.2.51
+++ ChangeLog	2001/05/08 21:32:55
@@ -1,3 +1,8 @@
+2001-05-08  Michael Meeks  <michael ximian com>
+
+	* liboaf/oaf-plugin.c (oaf_server_activate_shlib): 
+	return some half way useful exceptions.
+
 2001-04-21  Kjartan Maraas  <kmaraas gnome org>
 
 	* liboaf/oaf-async-corba.c: Added #include <config.h>
Index: liboaf/oaf-plugin.c
===================================================================
RCS file: /cvs/gnome/oaf/liboaf/oaf-plugin.c,v
retrieving revision 1.13.4.1
diff -u -r1.13.4.1 oaf-plugin.c
--- liboaf/oaf-plugin.c	2001/01/27 00:48:28	1.13.4.1
+++ liboaf/oaf-plugin.c	2001/05/08 21:32:55
@@ -22,7 +22,7 @@
  *  Author: Elliot Lee <sopwith redhat com>
  *
  */
-
+#include "config.h"
 #include "liboaf-private.h"
 
 #include <gmodule.h>
@@ -91,13 +91,31 @@
 
 		gmod = g_module_open (filename, G_MODULE_BIND_LAZY);
 		if (!gmod) {
-			return CORBA_OBJECT_NIL;	/* Couldn't load it */
+                        char *err;
+                        OAF_GeneralError *errval =
OAF_GeneralError__alloc ();
+
+                        err = g_strdup_printf ("g_module_open of '%s'
failed", filename);
+                        errval->description = CORBA_string_dup (err);
+                        CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
+                                             ex_OAF_GeneralError,
errval);
+                        g_free (err);
+			return CORBA_OBJECT_NIL; /* Couldn't load it */
 		}
 		
 		success = g_module_symbol (gmod, "OAF_Plugin_info",
 					   (gpointer *) &plugin);
 		if (!success) {
+                        char *err;
+                        OAF_GeneralError *errval =
OAF_GeneralError__alloc ();
+
 			g_module_close (gmod);
+
+                        err = g_strdup_printf ("Can't find symbol
OAF_Plugin_info "
+                                               "in '%s'", filename);
+                        errval->description = CORBA_string_dup (err);
+                        CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
+                                             ex_OAF_GeneralError,
errval);
+                        g_free (err);
 			return CORBA_OBJECT_NIL;
 		}
 
@@ -124,6 +142,15 @@
 					 "OAF_Plugin_info",
 					 (gpointer *) & plugin);
 		if (!success) {
+                        char *err;
+                        OAF_GeneralError *errval =
OAF_GeneralError__alloc ();
+
+                        err = g_strdup_printf ("Can't find symbol
OAF_Plugin_info "
+                                               "in '%s'", filename);
+                        errval->description = CORBA_string_dup (err);
+                        CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
+                                             ex_OAF_GeneralError,
errval);
+                        g_free (err);
 			return CORBA_OBJECT_NIL;
 		}
 	}

	Regards,

		Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot





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