[Issue 8135] New: throwing Error runs finally handler

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed May 23 12:32:37 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8135

           Summary: throwing Error runs finally handler
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: dawg at dawgfoto.de


--- Comment #0 from dawg at dawgfoto.de 2012-05-23 12:34:18 PDT ---
cat > bug.d << CODE
extern(C) int printf(const char*, ...);

void foo()
{
    throw new Error("msg");
}

void main()
{
    try
        foo();
    finally
        printf("finally\n");
}
CODE

dmd -run bug

prints:
finally
object.Error: msg

expected:
object.Error: msg
----

The expected behavior was discussed in bug 7018 and on the mailing list.
Throwing Errors (http://forum.dlang.org/thread/1566418.J7qGkEti3s@lyonel)

-- 
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