digitalmars.D.bugs - [Issue 6245] New: Using an exception object inside a delegate, causes a crash
- d-bugmail puremagic.com (57/57) Jul 03 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6245
- d-bugmail puremagic.com (10/10) Apr 24 2012 http://d.puremagic.com/issues/show_bug.cgi?id=6245
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: nobody puremagic.com ReportedBy: soywiz gmail.com --- Comment #0 from Carlos Ballesteros Velasco <soywiz 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: -------
Jul 03 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6245 SomeDude <lovelydear mailmetrash.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lovelydear mailmetrash.com --- Comment #1 from SomeDude <lovelydear mailmetrash.com> 2012-04-24 12:07:35 PDT --- Confirmed with 2.059 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 24 2012