[Issue 13542] New: std.file.FileException has GetLastError() as a default argument
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Sep 27 13:13:37 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13542
Issue ID: 13542
Summary: std.file.FileException has GetLastError() as a default
argument
Product: D
Version: D2
Hardware: All
OS: Windows
Status: NEW
Severity: normal
Priority: P1
Component: Phobos
Assignee: nobody at puremagic.com
Reporter: bugzilla at digitalmars.com
This has problems:
1. GetLastError() is not the same as errno, although D also has errno. So
there's confusion and wrong documentation about the arguments.
2. FileException is never called by anyone other than std.file, so the
constructor should be marked private.
3. The call to GetLastError() should be moved into the constructor body, in
order to reduce bloat (i.e. having code for it generated over and over at the
call site).
--
More information about the Digitalmars-d-bugs
mailing list