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.
This commit is contained in:
Michael Natterer
2019-01-27 13:24:06 +01:00
parent 8f0ed2422f
commit 07e3c1c15b

View File

@ -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;
}