digitalmars.D.bugs - [Issue 20585] New: std.stdio.File open() failure leaves File in
- d-bugmail puremagic.com (28/28) Feb 17 2020 https://issues.dlang.org/show_bug.cgi?id=20585
https://issues.dlang.org/show_bug.cgi?id=20585 Issue ID: 20585 Summary: std.stdio.File open() failure leaves File in invalid state Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: phobos Assignee: nobody puremagic.com Reporter: turkeyman gmail.com Eg: File f; try f.open("doesnt_exist.txt"); // catch (Exception e) { // handle open failure } assert(f.isOpen == false); // FAIL! f.isOpen == true even though open() failed if (f.isOpen) f.close(); // CRASH! file is not actually open This seems like a problem. --
Feb 17 2020