www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14949] New: Non-descriptive "Enforcement failed" when

https://issues.dlang.org/show_bug.cgi?id=14949

          Issue ID: 14949
           Summary: Non-descriptive "Enforcement failed" when attempting
                    to write to closed file
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: trivial
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: thecybershadow gmail.com

//////// test.d ////////
import std.stdio;

void main()
{
    File f;
    f.writeln("Hello!");
}
////////////////////////

This prints:

object.Exception std\stdio.d(2450): Enforcement failed

Error message could be better.

--
Aug 22 2015