std library hooks
Walter Bright
newshound2 at digitalmars.com
Sat Apr 14 12:49:54 PDT 2012
On 4/14/2012 3:57 AM, Jacob Carlborg wrote:
> Can I throw anything? A catchable exception ?
The compiler internally regards the assert function as "does not return". So do
whatever you want in it, as long as you do not return normally from it. That
means exit the program or throw something.
But if you throw a catchable exception, what if it gets caught? Your program is
now in an invalid state. I wouldn't do that.
More information about the Digitalmars-d
mailing list