Where did AssertError go?

Jonathan M Davis jmdavisProg at gmail.com
Mon Nov 17 20:50:11 PST 2008


I'm trying to catch an AssertError in some of my code, but I don't know how to import it with D 2.020.  I believe that it used to be in std.asserterror, but that module doesn't appear to exist anymore and I can't figure out where it is.  There's an AssertException in src/common/core/exception.d.  Did that replace AssertError (the documentation talks about assert throwing AssertErrors though, not AssertExceptions)?  Regardless, importing common.core.exception doesn't work.

Do failed assertions throw AssertError or AssertException?  And what do I have to do in order to be able to catch the appropriate one in my code?

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list