digitalmars.D.bugs - [Issue 7349] New: assert(0) in class destructor - bad (or incorrect) error
- d-bugmail puremagic.com (39/39) Jan 22 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7349
- d-bugmail puremagic.com (9/9) Apr 19 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7349
http://d.puremagic.com/issues/show_bug.cgi?id=7349 Summary: assert(0) in class destructor - bad (or incorrect) error Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: full.demon gmail.com --- Comment #0 from Taco <full.demon gmail.com> 2012-01-22 10:38:18 PST --- class C { public: this() { } ~this() { assert (0); } } void main() { C c = new C; } Upon destruction, it throws: core.exception.InvalidMemoryOperationError Which is very vague / incorrectly describes the problem. The documentation also does not mention throwing exceptions is forbidden in destructors (or are they not?). For debugging purposes I do like to assert some stuff in the destructor though... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 22 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7349 SomeDude <lovelydear mailmetrash.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lovelydear mailmetrash.com Severity|normal |minor -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 19 2012