/soc/2013/ankitkv/gobjectification: 7e4fe5116554: Check if an er...

Ankit Vani a at nevitus.org
Tue Sep 3 19:22:39 EDT 2013


Changeset: 7e4fe5116554be297dc47fa7cab38344ab6bd120
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-09-04 03:16 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/7e4fe5116554

Description:

Check if an error is valid before displaying it

diffstat:

 libpurple/Makefile.am |  2 +-
 libpurple/plugins.c   |  6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diffs (35 lines):

diff --git a/libpurple/Makefile.am b/libpurple/Makefile.am
--- a/libpurple/Makefile.am
+++ b/libpurple/Makefile.am
@@ -246,7 +246,7 @@ dbus_build_exported = $(addprefix $(srcd
 # We should probably make this better
 dbus_signals = $(addprefix $(srcdir)/, $(purple_coresources)) \
 	$(srcdir)/protocols/irc/irc.c \
-	$(srcdir)/protocols/jabber/libxmpp.c
+	$(srcdir)/protocols/jabber/jabber.c
 
 dbus-types.c: dbus-analyze-types.py $(purple_build_coreheaders)
 	$(AM_V_GEN)cat $(purple_build_coreheaders) | $(PYTHON) $(srcdir)/dbus-analyze-types.py --pattern=PURPLE_DBUS_DEFINE_TYPE\(%s\) > $@
diff --git a/libpurple/plugins.c b/libpurple/plugins.c
--- a/libpurple/plugins.c
+++ b/libpurple/plugins.c
@@ -102,7 +102,8 @@ purple_plugin_load(PurplePlugin *plugin,
 
 	if (!gplugin_plugin_manager_load_plugin(plugin, &err)) {
 		purple_debug_error("plugins", "Failed to load plugin %s: %s",
-				purple_plugin_get_filename(plugin), err->message);
+				purple_plugin_get_filename(plugin),
+				(err ? err->message : "Unknown reason"));
 
 		if (error)
 			*error = g_error_copy(err);
@@ -147,7 +148,8 @@ purple_plugin_unload(PurplePlugin *plugi
 
 	if (!gplugin_plugin_manager_unload_plugin(plugin, &err)) {
 		purple_debug_error("plugins", "Failed to unload plugin %s: %s",
-				purple_plugin_get_filename(plugin), err->message);
+				purple_plugin_get_filename(plugin),
+				(err ? err->message : "Unknown reason"));
 
 		if (error)
 			*error = g_error_copy(err);



More information about the Commits mailing list