Formal Review of std.process
Jacob Carlborg
doob at me.com
Fri Apr 12 09:31:09 PDT 2013
On 2013-04-12 13:31, Lars T. Kyllingstad wrote:
> I used to like enforce(), but now I
> think it has given D programmers a way too lax attitude towards error
> handling.)
What's wrong with "enforce" is that it's possible to not specify what
kind of exception to thrown. Otherwise I kind of like it.
> kill() throws Error if the code/signal is negative. I suspect the cases
> where this number comes directly from user input are so few and far
> between that it is reasonable to expect the programmer to ensure that it
> is nonnegative. In principle, on POSIX we don't need the check, because
> POSIX kill() will return an "invalid signal" error if you try to give it
> a negative number.
What do you thrown when POSIX kill() returns an "invalid signal" error?
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list