changeset 19642:077c2df60c38

Print an error when there was a problem parsing some XML
author Mark Doliner <mark@kingant.net>
date Tue, 04 Sep 2007 08:53:18 +0000
parents c0f503c18f7e
children ec7b92cbf49f
files libpurple/xmlnode.c
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/xmlnode.c	Tue Sep 04 08:09:55 2007 +0000
+++ b/libpurple/xmlnode.c	Tue Sep 04 08:53:18 2007 +0000
@@ -549,7 +549,16 @@
 xmlnode_parser_error_libxml(void *user_data, const char *msg, ...)
 {
 	struct _xmlnode_parser_data *xpd = user_data;
+	char errmsg[2048];
+	va_list args;
+
 	xpd->error = TRUE;
+
+	va_start(args, msg);
+	vsnprintf(errmsg, sizeof(errmsg), msg, args);
+	va_end(args);
+
+	purple_debug_error("xmlnode", "Error parsing xml file: %s\n", errmsg);
 }
 
 static xmlSAXHandler xmlnode_parser_libxml = {