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

2020-07-23 Thread Drone1h via Digitalmars-d-learn
Steven Schveighoffer, Adam D. Ruppe, I wish to thank you both for your explanations ! I have understood and I have created a small test program. Indeed, at least on Windows, the destructor of an automatic struct does not seem to run. Have a wonderful day... and I hope to be bugging the communi

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

2020-07-21 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/21/20 8:49 AM, Adam D. Ruppe wrote: On Tuesday, 21 July 2020 at 12:44:23 UTC, Drone1h wrote: Would it be possible to explain this, please ? nothrow only applies to Exception and its children. Error is a different branch. Error means you have a programming error and cannot be caught and

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

2020-07-21 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/21/20 8:44 AM, Drone1h wrote: 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.st

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

2020-07-21 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 21 July 2020 at 12:44:23 UTC, Drone1h wrote: Would it be possible to explain this, please ? nothrow only applies to Exception and its children. Error is a different branch. Error means you have a programming error and cannot be caught and recovered (though the compiler allows it

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

2020-07-21 Thread Drone1h via Digitalmars-d-learn
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