[Issue 13543] std.file.FileException has useless __FILE__ and __LINE__ arguments tacked on

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Sep 28 16:31:30 PDT 2014


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

--- Comment #15 from bearophile_hugs at eml.cc ---
(In reply to Stewart Gordon from comment #14)

> We already have this facility.  It's called a stack trace.

If I run this:


void main() {
    import std.stdio;
    auto f1 = File("some_file1.txt");
    auto f2 = File("some_file2.txt");
}


std.exception.ErrnoException at std\stdio.d(364): Cannot open file
`some_file1.txt' in mode `rb' (No such file or directory)
----------------
0x0040445B in @safe shared(core.stdc.stdio._iobuf)*
std.exception.__T12errnoEnforceTPOS4core4stdc5stdio6_iobufVAyaa11_7374645c737464696f2e64Vki364Z.errnoEnforce(shared(core.stdc.stdio._iobuf)*,
lazy immutable(char)[])
0x00402406 in D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv
0x004023DB in void rt.dmain2._d_run_main(int, char**, extern (C) int
function(char[][])*).runAll()
0x004022F1 in _d_run_main
0x00402100 in main
0x00414C7D in mainCRTStartup
0x7732D3C9 in BaseThreadInitThunk
0x771B1603 in RtlInitializeExceptionChain
0x771B15D6 in RtlInitializeExceptionChain


Where's the line number 3 of the user code that fails to open the file?

--


More information about the Digitalmars-d-bugs mailing list