Denis Koroskin wrote:
> 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(); }
> 

Um .. am I missing something here?

void check(bool condition, lazy string msg) { if (!condition) { printf(/* print 
msg here */); abort; } }

Reply via email to