ErrorException thrown when errno is modified ?

Alex Parrill via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu May 19 06:24:47 PDT 2016


On Thursday, 19 May 2016 at 13:05:19 UTC, chmike wrote:
> Hello,
>
> I'm planning to call some posix functions core.sys.posix that 
> may set the errno value in case of error. e.g. read() or 
> write().
>
> Checking the std.exception documentation I see that 
> ErrnoException may be thrown when errors setting errno may 
> occur. Does this affect the posix calls ?
>
> From what I saw in the code, it doesn't seam the case. Just 
> making sure I'm correct.

ErrnoException is the exception thrown by errnoEnforce, which is 
a convenient function for checking system calls.

D links to the same Posix functions that C does; their behavior 
is exactly the same (ie they don't throw).


More information about the Digitalmars-d-learn mailing list