[dmd-internals] Throwing Errors
Jacob Carlborg
doob at me.com
Tue Mar 13 03:31:09 PDT 2012
On Mar 12, 2012, at 10:29 PM, Sean Kelly <sean at invisibleduck.org> wrote:
> The handler is deprecated because DMD doesn't generate a valid call stack for _d_assert (which calls onAssertError) so it's impossible to return from the assert handler without throwing. This rendered the assert handler largely useless and after a few years of no one using it I decided to deprecate it. I'd be happy to keep the assert handler if people actually want it though, or if DMD changes its codegen. Personally, I'd like to be able to assert without throwing in some testing situations, and overriding a handler seems like an appropriate way to do this.
I would use it if it worked. Currently I'm catching AssertError which doesn't feel completley safe after the discussions here and in the newsgroup.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/dmd-internals/attachments/20120313/9447fb9e/attachment.html>
More information about the dmd-internals
mailing list