https://d.puremagic.com/issues/show_bug.cgi?id=11574
monarchdo...@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |monarchdo...@gmail.com --- Comment #3 from monarchdo...@gmail.com 2013-11-25 00:03:10 PST --- > Shows how scope(failure) return's can prevent proper exception bubbling. "scope(failure)" doesn't return. It lives "inside" the function it is declared in. It "holds" a return statement. It "rethrows" only once at the end of its block, but you are explicitly allowed to place a control statement inside the scope to *not* rethrow. An example case would be: //---- import std.stdio; void main() { foreach(i ; 0 .. 10) { scope(failure) continue; //Ignore exception and power through writeln(i); throw new Exception(""); } writeln("done!"); } //---- Another example could be an "Exception to return code" case: //---- HRESULT foo() nothrow { scope(failure) return E_FAIL; code_that_might_throw_here(); } //---- So I think the behavior is correct. Maybe just not intuitive at first, or not correctly documented. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------