http://d.puremagic.com/issues/show_bug.cgi?id=6245
Summary: Using an exception object inside a delegate, causes a crash Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: soy...@gmail.com --- Comment #0 from Carlos Ballesteros Velasco <soy...@gmail.com> 2011-07-03 19:03:00 PDT --- import std.stdio; void callDelegate(void delegate() cb) { cb(); } void writeEx(Throwable o) { writefln("%s", o); } void works1() { Throwable o2; try { throw(new Exception("This is an error")); } catch (Throwable o) { o2 = o; callDelegate({ writefln("%s", o2); }); } } void works2() { try { throw(new Exception("This is an error")); } catch (Throwable o) { writeEx(o); } } void do_not_work() { try { throw(new Exception("This is an error")); } catch (Throwable o) { callDelegate({ writefln("%s", o); }); } } int main(string[] args) { works1(); works2(); do_not_work(); return 0; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------