[Issue 6278] Regression(2.054 beta): 'in' contract inheritance doesn't work with safe code
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Jun 25 15:23:09 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=6278
--- Comment #16 from Walter Bright <bugzilla at digitalmars.com> ---
(In reply to hsteoh from comment #15)
> Shouldn't it be ContractError?
That was my thought, too. The problem with Error (and ContractError is derived
from Error) is that it is not necessary for unwinding to occur, i.e. no
destructors necessarily get called between the throw and the catch.
I am concerned this may leave the program in an indeterminate state if
ContractErrors are caught and then the program proceeds as normal.
Hence ContractException. (yes, yebblies, it was your idea!)
--
More information about the Digitalmars-d-bugs
mailing list