[Github-comments] [geany] Improve spawn module error messages (#541)

Jiří Techet notifications at xxxxx
Sat Oct 10 12:30:47 UTC 2015


@zhekov In my opinion, the whole prefix of the message that should be removed, i.e.:

search_find_in_files: spawn_with_callbacks() failed: CreateProcess() failed: 

This is something the users shouldn't see when GError message is displayed - it's just something that might be useful for debugging (might be fine to put it to the debugging messages).

Regarding the grep message, I think it wasn't a good idea to replace the original error message:

		ui_set_statusbar(TRUE, _("Cannot execute grep tool '%s';"
			" check the path setting in Preferences."), tool_prefs.grep_cmd);

with

	if (command_grep == NULL)
		command_line = g_strdup_printf("%s %s --", tool_prefs.grep_cmd, opts);
	else
	{
		command_line = g_strdup_printf("\"%s\" %s --", command_grep, opts);

The original message didn't use the GError at all and I think in this case it's the right thing to do - we know that the grep command failed to execute so we tell the user plus the info what needs to be changed.

I didn't go through all the uses of the new spawn module but I can imagine such a thing happens on other places too - from the special case where the spawn() is called we can probably create a more useful error message than what the spawn() itself can generate.

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/541#issuecomment-147085213
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20151010/0f87ff7e/attachment.html>


More information about the Github-comments mailing list