scope() statements and return

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Sun Oct 5 09:47:26 PDT 2014


On Sunday, 5 October 2014 at 16:42:24 UTC, ketmar via 
Digitalmars-d wrote:
> it does
> unwinding?

It is not guaranteed by spec (I guess this was added to allow 
assert(0) to be converted into HLT instruction) though in most 
cases it does. Neither it is guaranteed to run destructors of 
RAII entities (and it doesn't already for some cases).

Pretty much only reason `Error` is not equivalent to plain 
`abort` call is to allow some last resort debbugging dump and 
provide more meaningful information about the failure. Any 
application that tries to recover from Error in any way falls 
into unstandard D domain.


More information about the Digitalmars-d mailing list