[Issue 18987] New: Reading from unreadable file produces incorrect exception
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jun 15 00:56:17 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18987
Issue ID: 18987
Summary: Reading from unreadable file produces incorrect
exception
Product: D
Version: D2
Hardware: All
OS: Windows
Status: NEW
Severity: minor
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: elpenguino+D at gmail.com
Attempting to read from a file opened only for writing on Windows (10, build
17134, 64-bit) results in at least one ErrnoException carrying a "No error"
message.
Example:
```
import std.stdio;
void main()
{
auto x = File("hi", "w");
ubyte[100] buf;
x.rawRead(buf);
}
```
results in one "No error" ErrnoException when compiled with -m64 and
-m32mscoff, and two when compiled with -m32. The second one is thrown upon
closing the file.
--
More information about the Digitalmars-d-bugs
mailing list