[gimp] app: output errors to stderr when gimp_procedure_execute() fails with…
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: output errors to stderr when gimp_procedure_execute() fails with…
- Date: Thu, 30 Jul 2020 12:21:20 +0000 (UTC)
commit 90699199314669b7fc5e00574c2cc0ed5e92184c
Author: Jehan <jehan girinstud io>
Date: Thu Jul 30 14:03:41 2020 +0200
app: output errors to stderr when gimp_procedure_execute() fails with…
… argument validation.
I had a case where argument validation was failing on range and no error
was propagated (during a crash handling). Let's not leave these errors
totally silent as it makes such usually easy issues harder to debug. In
the specific case of no GError passed, just print the error to stderr.
app/pdb/gimpprocedure.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/app/pdb/gimpprocedure.c b/app/pdb/gimpprocedure.c
index 37b4ef6f74..f228acb825 100644
--- a/app/pdb/gimpprocedure.c
+++ b/app/pdb/gimpprocedure.c
@@ -492,6 +492,12 @@ gimp_procedure_execute (GimpProcedure *procedure,
{
return_vals = gimp_procedure_get_return_values (procedure, FALSE,
pdb_error);
+ if (! error)
+ /* If we can't properly propagate the error, at least print it
+ * to standard error stream. This makes debugging easier.
+ */
+ g_printerr ("%s failed to validate arguments: %s\n", G_STRFUNC, pdb_error->message);
+
g_propagate_error (error, pdb_error);
return return_vals;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]