add path for element throwing error
authorThomas Vander Stichele <thomas@apestaart.org>
Sat, 31 Jan 2004 19:09:38 +0000 (19:09 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Sat, 31 Jan 2004 19:09:38 +0000 (19:09 +0000)
Original commit message from CVS:
add path for element throwing error

ChangeLog
gst/gstelement.c
gst/gstelement.h

index 655251c..7b12087 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-01-31  Thomas Vander Stichele  <thomas at apestaart dot org>
+
+       * 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  <in7y118@public.uni-hamburg.de>
 
        * docs/random/mimetypes:
index 24cc8d1..454cc1a 100644 (file)
@@ -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",
index a643730..9221d61 100644 (file)
@@ -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__); \