www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13274] New: No stacktrace in initialization area

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

          Issue ID: 13274
           Summary: No stacktrace in initialization area
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: czdanol gmail.com

Hey, I have noticed that when you're throwing an exception in the
initialization area ( shared static this or when initializing variables ), no
stacktrace is shown.

Example code (tested on my computer and dpaste):

shared static this() {
    throw new Exception( "test" );    
}

void main() {
}

--
Aug 09 2014