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

           Summary: Throwing exception in finally block hides original
                    exception
           Product: D
           Version: 2.041
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: nfx...@gmail.com


--- Comment #0 from nfx...@gmail.com 2010-05-23 02:42:52 PDT ---
The message for assertion "a" will never be displayed, even though it certainly
fails:

void main() {
    try {
        assert(false, "a");
    } finally {
        assert(false, "b");
    }
}

Executing this program should display messages for both cases. Otherwise, it
may be impossible to tell what actually failed: assertion b may depend on
cleanup code that was supposed to be executed after assertion a. It is not
unusual that other, seemingly unrelated, assertions fail once the program's
state is "corrupted".

Suggested fix: link the exceptions via Throwable.next.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to