Summary: Handling of Errors should be defined
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: websites

--- Comment #0 from Jonathan M Davis <> 2012-05-23 20:00:21 
PDT ---
As discussed in this thread ( ), according to Walter,
it is _not_ guaranteed that finally blocks, scope statements, and destructors
will be run when an Error is thrown. However, the current implementation
guarantees it in almost all circumstances (nothrow functions are one exception,
I believe). As it stands, code is being written with the assumption that Errors
_do_ trigger those constructs (especially with regards to AssertError). So, if
the current behavior ever changes, it could break a lot of code.

There is quite a lot of dispute in that thread about what the behavior should
be (guarantee cleanup or don't guarantee cleanup). We need a decision on this
and to make the implementation match that and be _guaranteed_ to match it, with
the spec reflecting it. Otherwise, we have undefined behavior (which D
typically tries to avoid) which quite a few programs are currently relying on
and which may change in the future.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to