What is the point of nothrow?

wjoe none at example.com
Wed Jun 13 17:08:26 UTC 2018


On Wednesday, 13 June 2018 at 13:05:44 UTC, Kagamin wrote:
> On Wednesday, 13 June 2018 at 10:56:41 UTC, wjoe wrote:
>> I understand the idea that an Error is not supposed to be 
>> caught but why would such a 'feature' be desirable? Where's 
>> the benefit if nothing can be relied upon ?
>
> It's a debugging facility for development stage that allows to 
> print the error message and stack trace instead of silent 
> termination. Because it still needs to be caught for this, 
> explicit catch still works, but other cleanup mechanisms don't.

My question was more like what's the benefit of having thrown 
Errors corrupt your program state  rendering it useless for 
debugging ?


More information about the Digitalmars-d-learn mailing list