[Issue 2618] Assert errors should be unrecoverable.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jan 26 06:33:48 PST 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2618





------- Comment #3 from clugdbug at yahoo.com.au  2009-01-26 08:33 -------
David - I agree with Brad. Sometimes the assertion in a precondition can be
quite complicated. I've occasionally inserted tests to check it.
(A precondition in a LIBRARY function is a test for USER code. Not a test for
the library code).

However, as I see it, asserts are basically a debugging feature. So they
shouldn't interfere with nothrow.

I wonder if assert could be made unrecoverable inside a nothrow function?
IE, compiles to d_assert_nothrow()
which tests the condition, and immediately quits if it is not met?

Since assert() is magical already.


-- 



More information about the Digitalmars-d-bugs mailing list