On 3/8/06, Behdad Esfahbod <[EMAIL PROTECTED]> wrote: > On Tue, 7 Mar 2006, Federico Mena Quintero wrote: > > A critical warning is not some annoying spew in your console which you > > can ignore; it is an indication that something has gone HORRIBLY wrong > > and you should fix it immediately. It is not a faint light that says > > "check engine", it is a big siren screaming, "HOLY SHIT, SOMEONE PUT > > SUGAR IN YOUR GAS TANK". > > In many cases it's a false alarm. Something that should not have > marked as such in the first place. From my experience with Pango > modules recently, one major cause of these false alarms are > g_return_if_fail()s. It's important to differentiate between > some unusual but perfectly valid failure of something (like > failing to lock a font face, because the font file may have been > removed), and invalid input from the user. With former, you may > want to do a g_warning and return, only with latter one should > use g_return_if_fail. > > In other words, you should use g_return_if_fail in cases that > upon seeing the crash, the developer has something to fix. This > is not quite the case when font locking fails :)
And the big siren wailing at you will give a good push to fix it to behave correctly in an erroneous situation (it is a serious bug to handle error cases badly, even if it in this case is maybe just a wrong message type). At least that was the idea if I understood it right. :) False alarms should be the easiest ones to fix, so they have extra reason to be pushed for fix in my opinion... Bill Haneman said: > The a11y critical warnings are 99% false alarms, due to misuse of > g_return_*. Unfortunately, fixing this is very time-consuming since > each instance of g_return_* in the a11y code must be examined > ndependently in order to determine whether it's a "false alarm" or not. And you can probably guess how many of those would be fixed if there wasn't a gun pointed at the developers head with an ultimatum "fix it or crash" :) It's pain in the arse, but if it makes code better and more correct, it should it be worth it, right? -- Kalle Vahlman, [EMAIL PROTECTED] Powered by http://movial.fi Interesting stuff at http://syslog.movial.fi
_______________________________________________ desktop-devel-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/desktop-devel-list
