Asserts inside nothrow function
Leandro Lucarella
llucax at gmail.com
Sat May 23 07:37:42 PDT 2009
Denis Koroskin, el 23 de mayo a las 18:12 me escribiste:
> I just started using nothrow functions a little bit and came across the following issue.
> Some of the functions that I'd like to mark as nothrow have debug asserts inside them.
>
> They used to throw an Exception, but I'd like to change their behavior and terminate an application whenever an assertion fails inside a nothrow function.
>
> It's not very handy to write
>
> try { assert(condition, errorMessage); } catch { abort(); }
I don't know what happened with OutOfMemoty errors and nothrow (I guess
OutOfMemory was not considered an exception in terms of nothrow), but
I think and assertion should have the same treatment.
--
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------
Y nosotros? Y nosotros qué tenemos, eh? Yo te pregunto qué tenemos? El
kani kama es extrangero y los picles, los picles ya no son nuestros...
Tenemos el 'ulce de leche, que es argentino y machazo, como un pampeano
en su rancho. Tenemos el clásico, el colonial y el repostero y en
Santiago del Estero, se lo comen a pan lactal.
More information about the Digitalmars-d
mailing list