Oaf exception patch ...
- From: Michael Meeks <michael ximian com>
- To: Darin Adler <darin eazel com>, Maciej Stachowiak <mjs eazel com>
- Cc: gnome-components-list gnome org
- Subject: Oaf exception patch ...
- Date: Fri, 27 Jul 2001 14:06:29 -0400 (EDT)
Hi there,
This makes sense of a cryptic error I was getting with monikers,
and translates some exceptions nicely:
May I commit ?
Michael.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/oaf/ChangeLog,v
retrieving revision 1.174
diff -u -r1.174 ChangeLog
--- ChangeLog 2001/07/24 14:34:26 1.174
+++ ChangeLog 2001/07/27 18:05:27
@@ -1,3 +1,9 @@
+2001-07-27 Michael Meeks <michael ximian com>
+
+ * liboaf/oaf-plugin.c (oaf_server_activate_shlib): fire an
+ exception if the library didn't contain the plugin we wanted.
+ Localise exception strings.
+
2001-07-24 Wang Jian <lark linux net cn>
* configure.in: zh_TW.Big5 added in ALL_LINGUAS
Index: liboaf/oaf-plugin.c
===================================================================
RCS file: /cvs/gnome/oaf/liboaf/oaf-plugin.c,v
retrieving revision 1.15
diff -u -r1.15 oaf-plugin.c
--- liboaf/oaf-plugin.c 2001/05/15 19:53:15 1.15
+++ liboaf/oaf-plugin.c 2001/07/27 18:05:27
@@ -30,6 +30,7 @@
#include <orbit/poa/poa.h>
#include "oaf-plugin.h"
+#include "oaf-i18n.h"
typedef struct
{
@@ -94,7 +95,8 @@
char *error_string;
OAF_GeneralError *error = OAF_GeneralError__alloc ();
- error_string = g_strdup_printf ("g_module_open of '%s' failed", filename);
+ error_string = g_strdup_printf (
+ _("g_module_open of '%s' failed"), filename);
error->description = CORBA_string_dup (error_string);
CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
ex_OAF_GeneralError, error);
@@ -110,8 +112,9 @@
g_module_close (gmod);
- error_string = g_strdup_printf ("Can't find symbol OAF_Plugin_info "
- "in '%s'", filename);
+ error_string = g_strdup_printf (
+ _("Can't find symbol OAF_Plugin_info in '%s'"),
+ filename);
error->description = CORBA_string_dup (error_string);
CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
ex_OAF_GeneralError, error);
@@ -145,8 +148,9 @@
char *error_string;
OAF_GeneralError *error = OAF_GeneralError__alloc ();
- error_string = g_strdup_printf ("Can't find symbol OAF_Plugin_info "
- "in '%s'", filename);
+ error_string = g_strdup_printf (
+ _("Can't find symbol OAF_Plugin_info in '%s'"),
+ filename);
error->description = CORBA_string_dup (error_string);
CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
ex_OAF_GeneralError, error);
@@ -198,7 +202,16 @@
CORBA_Object_release (retval, ev);
retval = new_retval;
}
- }
+ } else {
+ OAF_GeneralError *error = OAF_GeneralError__alloc ();
+ char *error_string = g_strdup_printf (
+ _("Shlib '%s' didn't contain '%s'"),
+ filename, iid);
+ error->description = CORBA_string_dup (error_string);
+ CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
+ ex_OAF_GeneralError, error);
+ g_free (error_string);
+ }
return retval;
}
Index: po/POTFILES.in
===================================================================
RCS file: /cvs/gnome/oaf/po/POTFILES.in,v
retrieving revision 1.3
diff -u -r1.3 POTFILES.in
--- po/POTFILES.in 2001/07/13 00:50:30 1.3
+++ po/POTFILES.in 2001/07/27 18:05:27
@@ -2,6 +2,7 @@
liboaf/oaf-fork-server.c
liboaf/oaf-mainloop.c
liboaf/oaf-registration.c
+liboaf/oaf-plugin.c
oafd/ac-corba.c
oafd/main.c
oafd/od-activate.c
--
mmeeks gnu org <><, Pseudo Engineer, itinerant idiot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]