www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - invariant doesn't throw InvariantException

reply Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Wrong invariants don't throw a InvariantExceptions (as documented).
In fact there is no type "InvariantException" in Phobos.

test case:
http://dstress.kuehne.cn/run/invariant_25.d

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFCBgE83w+/yD4P9tIRAluuAKDKJ/R9+gwNZRN7UlX3xoZZgAIE/wCgs3rs
XTk7hMp1R6JGlmJrJNa1ne8=
=IiYV
-----END PGP SIGNATURE-----
Feb 06 2005
parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Thomas Kuehne wrote:

 Wrong invariants don't throw a InvariantExceptions (as documented).
 In fact there is no type "InvariantException" in Phobos.
Isn't this the same as with "InException" and "OutException" ? They also throw simple AssertError, when they *should* throw the appropriate Exception type according to the Contract docs. (and neither InException nor OutException class exist in Phobos) Of course, the documentation even says "AssertException", when in reality it throws "AssertError", so the spec is outdated... (even when it comes to the most basic contract, that is: assert) There also seem to be no way to turn the Phobos contracts on, save for compiling a debug version of Phobos yourself, with the DFLAGS setting of -release omitted ? The default library has no contracts. http://www.digitalmars.com/d/dbc.html --anders
Feb 06 2005
parent Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Anders F Björklund schrieb am Sun, 06 Feb 2005 16:50:42 +0100:
 Thomas Kuehne wrote:

 Wrong invariants don't throw a InvariantExceptions (as documented).
 In fact there is no type "InvariantException" in Phobos.
Isn't this the same as with "InException" and "OutException" ? They also throw simple AssertError, when they *should* throw the appropriate Exception type according to the Contract docs. (and neither InException nor OutException class exist in Phobos) Of course, the documentation even says "AssertException", when in reality it throws "AssertError", so the spec is outdated... (even when it comes to the most basic contract, that is: assert)
Added to DStress http://dstress.kuehne.cn/run/in_out_body_05.d http://dstress.kuehne.cn/run/in_out_body_06.d http://dstress.kuehne.cn/run/in_out_body_07.d http://dstress.kuehne.cn/run/in_out_body_08.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCB2ND3w+/yD4P9tIRAppnAKCMWkQjpadKy3WSZkoIUIEpGOSoGwCfU2Tk Ovy0Zqr+q53TgUr+qaXyXgk= =ywcv -----END PGP SIGNATURE-----
Feb 07 2005