digitalmars.D.bugs - invariant doesn't throw InvariantException
- Thomas Kuehne (12/12) Feb 06 2005 -----BEGIN PGP SIGNED MESSAGE-----
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (13/15) Feb 06 2005 Isn't this the same as with "InException" and "OutException" ?
- Thomas Kuehne (14/24) Feb 07 2005 -----BEGIN PGP SIGNED MESSAGE-----
-----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
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
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Anders F Björklund schrieb am Sun, 06 Feb 2005 16:50:42 +0100:Thomas Kuehne wrote: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-----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)
Feb 07 2005