[gimp] Issue #2863 - Improve error reporting for scripts



commit 07e3c1c15bf120fb42fe88fdf90d1122b19d714e
Author: Michael Natterer <mitch gimp org>
Date:   Sun Jan 27 13:24:06 2019 +0100

    Issue #2863 - Improve error reporting for scripts
    
    gimp_plug_in_handle_proc_install(): print the procedure name when
    bailing out of a wrong proc install call. For an obsolete full-path
    menu label, also print the label. Original patch by Liam Quin.

 app/plug-in/gimpplugin-message.c | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)
---
diff --git a/app/plug-in/gimpplugin-message.c b/app/plug-in/gimpplugin-message.c
index 89570cea7f..fd53482887 100644
--- a/app/plug-in/gimpplugin-message.c
+++ b/app/plug-in/gimpplugin-message.c
@@ -792,9 +792,11 @@ gimp_plug_in_handle_proc_install (GimpPlugIn    *plug_in,
     {
       gimp_message (plug_in->manager->gimp, NULL, GIMP_MESSAGE_ERROR,
                     "Plug-in \"%s\"\n(%s)\n\n"
-                    "attempted to install a procedure NULL parameter name.",
+                    "attempted to install procedure \"%s\" with a "
+                    "NULL parameter name.",
                     gimp_object_get_name (plug_in),
-                    gimp_file_get_utf8_name (plug_in->file));
+                    gimp_file_get_utf8_name (plug_in->file),
+                    canonical);
       g_free (canonical);
       return;
     }
@@ -803,9 +805,11 @@ gimp_plug_in_handle_proc_install (GimpPlugIn    *plug_in,
     {
       gimp_message (plug_in->manager->gimp, NULL, GIMP_MESSAGE_ERROR,
                     "Plug-in \"%s\"\n(%s)\n\n"
-                    "attempted to install a procedure with invalid UTF-8 strings.",
+                    "attempted to install procedure \"%s\" with "
+                    "invalid UTF-8 strings.",
                     gimp_object_get_name (plug_in),
-                    gimp_file_get_utf8_name (plug_in->file));
+                    gimp_file_get_utf8_name (plug_in->file),
+                    canonical);
       g_free (canonical);
       return;
     }
@@ -815,10 +819,13 @@ gimp_plug_in_handle_proc_install (GimpPlugIn    *plug_in,
     {
       gimp_message (plug_in->manager->gimp, NULL, GIMP_MESSAGE_ERROR,
                     "Plug-in \"%s\"\n(%s)\n\n"
-                    "attempted to install a procedure with a full menu path "
-                    "as menu label, this is not supported any longer.",
+                    "attempted to install procedure \"%s\" with a full "
+                    "menu path \"%s\" as menu label, this is not supported "
+                    "any longer.",
                     gimp_object_get_name (plug_in),
-                    gimp_file_get_utf8_name (plug_in->file));
+                    gimp_file_get_utf8_name (plug_in->file),
+                    canonical,
+                    proc_install->menu_label);
       g_free (canonical);
       return;
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]