On 05/05/2011 11:22 PM, Tomas Gavenciak wrote:
Ahoj!
Tak premyslim - jaky je zamysleny ucel GP_BUG_ON oproti GP_CHECK? (krom obracene podminky) Pokud je mezi nimi nejaky hlubsi semanticky rozdil, nahradime pul GP_CHECKU za GP_BUG_ON?
Mejte se krasne, Tomas
Hi, GP_BUG_ON was meant to check for bugs that are internal for the library (something *we* have to fix :-) ). GP_CHECK is meant for errors caused by the user (something *they* have to fix :-) ) To remove the inconsistency where GP_BUG_ON expects an inverted condition, I have renamed it to GP_ASSERT, and added a second parameter, a human-friendly message, to GP_CHECK. (GP_ASSERT does not need a human-friendly message as it is us who have to make sense of it.) Thank you for pointing this out, Best regards, Jiri Dluhos