std/process.d: nothrow functions which throw (in struct ProcessPipes)

Drone1h drone1h at gmail.com
Tue Jul 21 12:44:23 UTC 2020


Hello All,

In phobos/std/process.d, in the ProcessPipes struct, we can see a 
few functions which are marked with "nothrow", but which (under 
some conditions) throw:

     @property File stdout() @safe nothrow
     {
         if ((_redirectFlags & Redirect.stdout) == 0)
             throw new Error("Child process' standard output 
stream hasn't "
                             ~"been redirected.");
         return _stdout;
     }

Would it be possible to explain this, please ? Or point me to 
some relevant documentation, please ?

Thank you.


More information about the Digitalmars-d-learn mailing list