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

Adam D. Ruppe destructionator at gmail.com
Tue Jul 21 12:49:54 UTC 2020


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 anyway, it reserves the 
right to just abort the program instead of actually going through 
the try/catch system), so it doesn't count as a normal exception, 
even though it is still thrown.

You are supposed to prevent Errors by fixing the bugs in your 
code, so in a final build they never happen.


More information about the Digitalmars-d-learn mailing list