std library hooks

Sean Kelly sean at invisibleduck.org
Sat Apr 14 11:29:30 PDT 2012


On Apr 14, 2012, at 3:57 AM, Jacob Carlborg <doob at me.com> wrote:

> On 2012-04-13 23:16, Sean Kelly wrote:
>> On Apr 13, 2012, at 12:28 PM, Jacob Carlborg<doob at me.com>  wrote:
>> 
>>> On 2012-04-13 17:26, Sean Kelly wrote:
>>>> Because no one used it. Sounds like I may need to un-deprecate it for 2.060.
>>> 
>>> Yes, please. There are now several people that want to use it. But does the compiler handles this correctly? I think you previously mentioned something about this.
>> 
>> DMD requires that you throw from the assert handler (at least when you compile with the -release flag or similar). That limitation is the other reason I deprecated the assert handler, but I imagine there are plenty of uses for it that exit with a throw.
> 
> Can I throw anything? A catchable exception ?

Yes. The issue is simply that DMD doesn't generate a call stack compatible with returning via any means but throwing. But you can throw anything you want. 


More information about the Digitalmars-d mailing list