add path for element throwing error

Original commit message from CVS:
add path for element throwing error
This commit is contained in:
Thomas Vander Stichele 2004-01-31 19:09:38 +00:00
parent 5d0b5a209f
commit 4fb17846d4
3 changed files with 12 additions and 3 deletions

View file

@ -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> 2004-01-31 Benjamin Otte <in7y118@public.uni-hamburg.de>
* docs/random/mimetypes: * docs/random/mimetypes:

View file

@ -2393,6 +2393,7 @@ gst_element_error_full
const gchar *file, const gchar *function, gint line) const gchar *file, const gchar *function, gint line)
{ {
GError *error = NULL; GError *error = NULL;
gchar *name;
gchar *sent_message; gchar *sent_message;
gchar *sent_debug; gchar *sent_debug;
@ -2435,13 +2436,15 @@ gst_element_error_full
/* emit the signal, make sure the element stays available */ /* emit the signal, make sure the element stays available */
gst_object_ref (GST_OBJECT (element)); gst_object_ref (GST_OBJECT (element));
name = gst_object_get_path_string (GST_OBJECT (element));
if (debug) if (debug)
sent_debug = g_strdup_printf ("%s(%d):%s:\n%s", sent_debug = g_strdup_printf ("%s(%d): %s: %s:\n%s",
file, line, function, file, line, function, name,
debug ? debug : ""); debug ? debug : "");
else else
sent_debug = NULL; sent_debug = NULL;
g_free (debug); g_free (debug);
g_free (name);
g_signal_emit (G_OBJECT (element), gst_element_signals[ERROR], 0, element, g_signal_emit (G_OBJECT (element), gst_element_signals[ERROR], 0, element,
error, sent_debug); error, sent_debug);
GST_CAT_INFO (GST_CAT_ERROR_SYSTEM, "signalled error in %s: %s", GST_CAT_INFO (GST_CAT_ERROR_SYSTEM, "signalled error in %s: %s",

View file

@ -142,7 +142,6 @@ typedef enum {
#define GST_ELEMENT_ERROR(el, domain, code, message, debug) G_STMT_START { \ #define GST_ELEMENT_ERROR(el, domain, code, message, debug) G_STMT_START { \
gchar *__msg = _gst_element_error_printf message; \ gchar *__msg = _gst_element_error_printf message; \
gchar *__dbg = _gst_element_error_printf debug; \ gchar *__dbg = _gst_element_error_printf debug; \
GST_ERROR_OBJECT (el, "%s", __dbg); \
gst_element_error_full (GST_ELEMENT(el), \ gst_element_error_full (GST_ELEMENT(el), \
GST_ ## domain ## _ERROR, GST_ ## domain ## _ERROR_ ## code, \ GST_ ## domain ## _ERROR, GST_ ## domain ## _ERROR_ ## code, \
__msg, __dbg, __FILE__, GST_FUNCTION, __LINE__); \ __msg, __dbg, __FILE__, GST_FUNCTION, __LINE__); \