[Github-comments] [geany] Alter spawn to return the error message only in error->message (#701)

zhekov notifications at xxxxx
Tue Oct 20 16:39:13 UTC 2015


I plan one final change to the spawning module messages. Since both g_spawn/*nix and the Windows spawn are complex calls, where several functions may fail, the plain error message may not be insufficient to understand what's going on.

To avoid replacing all g_spawn/*nix messages, and handle this situation, the final messages will be as follows:

exec() or CreateProcess() failed, which are almost 100% of the cases => the plain errno/winerror message is returned: "No such file or directory", "Invalid exec format" and so on.

Some other function failed (exceedingly rare) -> Descriptive text (errno/winerror message), for example: "Failed to read data from child process (Bad file descriptor)" or "Unexpected error in select() reading data from a child process (I/O error)". These examples are a bit random, I have never seen g_spawn failing like that.

And there will be no different error messages depending on whether spawn is compiled for testing. The above text should be a reasonable compromise - too bad it haven't occurred to me earlier.

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/701#issuecomment-149626060
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20151020/57073b8f/attachment.html>


More information about the Github-comments mailing list