From 9843ffeed207514ed70f8458eff5791801c5590a Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Thu, 14 May 2015 11:11:44 +0200 Subject: [PATCH] ges: Fix some error settings Summary: Depends on D176 Reviewers: Mathieu_Du Differential Revision: http://phabricator.freedesktop.org/D177 --- ges/ges-structured-interface.c | 10 +++++++++- ges/ges-validate.c | 5 ++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ges/ges-structured-interface.c b/ges/ges-structured-interface.c index 35c1883..5228e3f 100644 --- a/ges/ges-structured-interface.c +++ b/ges/ges-structured-interface.c @@ -232,6 +232,13 @@ _ges_get_asset_from_timeline (GESTimeline * timeline, GType type, if (err) g_propagate_error (error, err); if (!asset || (error && *error)) { + + if (error && !*error) { + *error = g_error_new (GES_ERROR, 0, + "There was an error requesting the asset with id %s and type %s (%s)", + id, g_type_name (type), error ? (*error)->message : "unknown"); + } + GST_ERROR ("There was an error requesting the asset with id %s and type %s (%s)", id, g_type_name (type), error ? (*error)->message : "unknown"); @@ -356,7 +363,8 @@ _ges_add_clip_from_struct (GESTimeline * timeline, GstStructure * structure, } if (!layer) { - g_error_new (GES_ERROR, 0, "No layer with priority %d", layer_priority); + *error = + g_error_new (GES_ERROR, 0, "No layer with priority %d", layer_priority); goto beach; } diff --git a/ges/ges-validate.c b/ges/ges-validate.c index f74a43e..e546748 100644 --- a/ges/ges-validate.c +++ b/ges/ges-validate.c @@ -545,7 +545,10 @@ _validate_action_execute (GstValidateScenario * scenario, if (!func (timeline, action->structure, &err)) { GST_VALIDATE_REPORT (scenario, - g_quark_from_string ("scenario::execution-error"), err->message); + g_quark_from_string ("scenario::execution-error"), + "Could not execute %s (error: %s)", + gst_structure_get_name (action->structure), + err ? err->message : "None"); g_clear_error (&err); -- 2.7.4