January 22, 2012 [Issue 7349] New: assert(0) in class destructor - bad (or incorrect) error | ||||
---|---|---|---|---|
| ||||
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: ------- |
April 19, 2012 [Issue 7349] assert(0) in class destructor - bad (or incorrect) error | ||||
---|---|---|---|---|
| ||||
Posted in reply to Taco | 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: ------- |
Copyright © 1999-2021 by the D Language Foundation