[libgrss] Fixed error handling in grss_feed_channel_new_from_xml()
- From: Roberto Guido <rguido src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgrss] Fixed error handling in grss_feed_channel_new_from_xml()
- Date: Fri, 25 Apr 2014 00:39:23 +0000 (UTC)
commit 3c6de24a5bcaf84b45099008a9afaa98a8c7d6e0
Author: Roberto Guido <rguido src gnome org>
Date: Fri Apr 25 02:36:36 2014 +0200
Fixed error handling in grss_feed_channel_new_from_xml()
src/feed-channel.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/feed-channel.c b/src/feed-channel.c
index 60dae27..9789564 100644
--- a/src/feed-channel.c
+++ b/src/feed-channel.c
@@ -30,7 +30,6 @@
* @short_description: a feed
*
* #GrssFeedChannel rappresents a single feed which may be fetched and parsed.
- * It mostly is a passive container for attributes.
*/
typedef struct {
@@ -180,12 +179,15 @@ grss_feed_channel_new_from_xml (xmlDocPtr doc, GError **error)
{
GrssFeedParser *parser;
GrssFeedChannel *ret;
+ GError *myerror;
ret = g_object_new (GRSS_FEED_CHANNEL_TYPE, NULL);
parser = grss_feed_parser_new ();
- grss_feed_parser_parse_channel (parser, ret, doc, error);
- if (error != NULL) {
+ myerror = NULL;
+ grss_feed_parser_parse_channel (parser, ret, doc, &myerror);
+ if (myerror != NULL) {
+ g_propagate_error (error, myerror);
g_object_unref (ret);
ret = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]