www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8083] New: Throwing in a loop results in infinite bypassing exception messages

http://d.puremagic.com/issues/show_bug.cgi?id=8083

           Summary: Throwing in a loop results in infinite bypassing
                    exception messages
           Product: D
           Version: D2
          Platform: All
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: druntime
        AssignedTo: nobody puremagic.com
        ReportedBy: verylonglogin.reg gmail.com



14:33:14 MSD ---
---
import std.stdio;

void main() {
//  for (auto bc = File.ByChunk(File(""), 1); ; ) { } // as expected
//  for (auto bc = File("").byChunk(1);  false; ) { } // as expected
    for (auto bc = File("").byChunk(1); ; ) { } // infinite loop
    foreach(line; File("").byLine()) { }        // infinite loop too
}
---
It writes this in infinite loop:

Bypasses std.exception.ErrnoException std\stdio.d(288)
=== Bypassed ===
std.exception.ErrnoException std\stdio.d(288): Cannot open file `' in mode `rb'
(No error)


Not sure is it dmd or druntime issue.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 11 2012