[Issue 4911] Bad error messages from attempts to write into read-only File
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jun 26 05:25:42 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=4911
--- Comment #2 from bearophile_hugs at eml.cc 2011-06-26 05:20:49 PDT ---
In DMD 2.053 this program:
import std.stdio: File;
void foo() {
auto f = File("test.raw", "r");
f.write("hello");
}
void bar() {
foo();
}
void main() {
bar();
}
Gives the error message:
std.exception.ErrnoException at std\stdio.d(286): Cannot open file `test.raw' in
mode `r' (No such file or directory)
----------------
...\test.d(8): void test.bar()
...\test.d(10): _Dmain
----------------
I think this is as good as it gets, unless a function to find the line number
and module name of the precedent stack frame is used at the exception point, so
I close this bug report.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list