From: Thomas Vander Stichele Date: Sat, 31 Jan 2004 19:09:38 +0000 (+0000) Subject: add path for element throwing error X-Git-Tag: BRANCH-RELEASE-0_7_4-ROOT~39 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4fb17846d4a1c889e1398821a83cb7ef3540c113;p=platform%2Fupstream%2Fgstreamer.git add path for element throwing error Original commit message from CVS: add path for element throwing error --- diff --git a/ChangeLog b/ChangeLog index 655251c..7b12087 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-01-31 Thomas Vander Stichele + + * docs/gst/tmpl/gstelement.sgml: + * docs/gst/tmpl/gstxml.sgml: + * gst/gstelement.c: (gst_element_error_full): + add element path to error + 2004-01-31 Benjamin Otte * docs/random/mimetypes: diff --git a/gst/gstelement.c b/gst/gstelement.c index 24cc8d1..454cc1a 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -2393,6 +2393,7 @@ gst_element_error_full const gchar *file, const gchar *function, gint line) { GError *error = NULL; + gchar *name; gchar *sent_message; gchar *sent_debug; @@ -2435,13 +2436,15 @@ gst_element_error_full /* emit the signal, make sure the element stays available */ gst_object_ref (GST_OBJECT (element)); + name = gst_object_get_path_string (GST_OBJECT (element)); if (debug) - sent_debug = g_strdup_printf ("%s(%d):%s:\n%s", - file, line, function, + sent_debug = g_strdup_printf ("%s(%d): %s: %s:\n%s", + file, line, function, name, debug ? debug : ""); else sent_debug = NULL; g_free (debug); + g_free (name); g_signal_emit (G_OBJECT (element), gst_element_signals[ERROR], 0, element, error, sent_debug); GST_CAT_INFO (GST_CAT_ERROR_SYSTEM, "signalled error in %s: %s", diff --git a/gst/gstelement.h b/gst/gstelement.h index a643730..9221d61 100644 --- a/gst/gstelement.h +++ b/gst/gstelement.h @@ -142,7 +142,6 @@ typedef enum { #define GST_ELEMENT_ERROR(el, domain, code, message, debug) G_STMT_START { \ gchar *__msg = _gst_element_error_printf message; \ gchar *__dbg = _gst_element_error_printf debug; \ - GST_ERROR_OBJECT (el, "%s", __dbg); \ gst_element_error_full (GST_ELEMENT(el), \ GST_ ## domain ## _ERROR, GST_ ## domain ## _ERROR_ ## code, \ __msg, __dbg, __FILE__, GST_FUNCTION, __LINE__); \