Bug 9059 – No exception runtime error message with missing file + byLine

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
druntime
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2012-11-22T15:46:00Z
Last change time
2014-12-13T07:27:34Z
Keywords
diagnostic
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2012-11-22T15:46:02Z
import std.stdio: File; void main() { auto f = File("missing").byLine(); } If I compile and run this program with dmd 2.061alpha with "-g" it correctly gives a stack trace (with no line numbers): dmd -g -run test.d std.exception.ErrnoException@std\stdio.d(315): Cannot open file `missing' in mode `rb' (No such file or direct ory) ---------------- 0x00412F44 in char[][] core.sys.windows.stacktrace.StackTrace.trace() 0x00412DCF in core.sys.windows.stacktrace.StackTrace core.sys.windows.stacktrace.StackTrace.__ctor() 0x00404D2F in D3std9exception80__T12errnoEnforceTPOS4core4Çâ¬c5Ôio6_+bufVAyaa11_7374645c²696f2e¨Vk315ZÇÄ-FÇÜ-L Çâ-ZÇ܃ 0x004045DC in extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void runMa in() 0x00404612 in extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void runAl l() 0x00404229 in _d_run_main 0x00402D04 in main 0x7782D309 in BaseThreadInitThunk 0x77A51603 in RtlInitializeExceptionChain 0x77A515D6 in RtlInitializeExceptionChain ---------------- If I compile and run it without "-g" (dmd -run test.d) it doesn't show the std.exception.ErrnoException, and the program just crashes with no error messages at run-time. Maybe this is a regression.
Comment #1 by verylonglogin.reg — 2013-11-07T09:33:44Z
Works now. Probably connected with Issue 8083. Will not close as source reason is unknown.
Comment #2 by r.sagitario — 2014-12-13T07:27:34Z
Works for me, too. It's unlikely someone will try to figure out why it wasn't working two years ago.