[Issue 16502] spawnProcess does not throw on exec errors
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Sep 17 07:56:55 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16502
--- Comment #2 from Roman <freeslave93 at gmail.com> ---
(In reply to b2.temp from comment #1)
> Why should it ?
>
> You can check the exit status, read stderr if your process is piped and
> throw if you like. As example can you give any language whose the process
> methods, as implemented in their standard libraries, throw ?
The example is right in the std.process: spawnProcess throws if file is not
executable or working directory does not exist.
Reading stderr and exit status is different from handling the situation where
process could not start at all.
--
More information about the Digitalmars-d-bugs
mailing list