https://issues.dlang.org/show_bug.cgi?id=13541
--- Comment #8 from Walter Bright <bugzi...@digitalmars.com> --- Point taken about sysErrorString() and GetLastError() not being infinite recursion. But still, FileException should be fixed so it does not throw in the constructor, i.e. rewrite: if(length == 0) { throw new Exception( "failed getting error string for WinAPI error code: " ~ sysErrorString(GetLastError())); } as: if(length == 0) { auto newErrCode = GetLastError(); assert(errCode != newErrCode); // no infinite recursion return "failed getting error string for WinAPI error code: " ~ sysErrorString(newErrCode); } or something like that. --