[Github-comments] [geany] Add error reporting for opening URIs on Windows (#937)

Colomban Wendling notifications at xxxxx
Sun Mar 6 14:25:22 UTC 2016


> @@ -794,7 +795,14 @@ void win32_open_browser(const gchar *uri)
>  				uri++;
>  		}
>  	}
> -	ShellExecute(NULL, "open", uri, NULL, NULL, SW_SHOWNORMAL);
> +	ret = (gint) ShellExecute(NULL, "open", uri, NULL, NULL, SW_SHOWNORMAL);
> +	if (ret <= 32)
> +	{
> +		gchar *err = g_win32_error_message(GetLastError());
> +		/* TODO add a GUI warning that opening an URI failed */
> +		g_warning("ShellExecute failed opening \"%s\" (code %d): %s", uri, ret, err);

You could add a translatable string if you want, it wouldn't get translated for next release but that wouldn't be worse than not translatable at all.  But well, if it's meant to be changed right after the release (would have to remember :)), I guess it doesn't really matter.

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/937/files#r55140237
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160306/fa154900/attachment.html>


More information about the Github-comments mailing list