From: Jocelyn T. <tur...@gm...> - 2007-08-15 15:28:56
|
Hi! the policy was that everything that should be caught in tests and dev time are placed in asserts (so that performance should not be something preventing us from doing a lot of verification) Exception on the other hand were aimed to be used for cases needing user attention in release version (especially errors affected by external entities like files or databases) I also had this bad feeling that bugs could slip from our hands in release version, but most cases the error wouldn't even be usefull (because showing a general error and exiting is not very different from just crashing) For the middle land between the two lines (where user feedback through exception is not appropriate/usefull and where just a Q_ASSERT would skip important information in release) I think that a good approach would be to have a log file filled with qWarning or qFatal that logs unexpected states noticed to search in cases of bugs Hope this give you an idea! (woohoo! first mail on the list!) Jocelyn On 8/15/07, pdubois <pd...@re...> wrote: > > Hello all! > > I'd to ask a couple questions on the use of asserts and Q_ASSERTs in > FremCAD. > > I know the asserts can be disabled at compile time but the fact that > certain conditions might not > be caught at runtime make me a bit nervous. Can anyone explain the > usage policy for the asserts > and Q_ASSERTS found in the code and perhaps why the error conditions > weren't handled via > try/catch blocks? > > Thanks in advance, > > Patrick Dubois. > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Fremcad-devel mailing list > Fre...@li... > https://lists.sourceforge.net/lists/listinfo/fremcad-devel > |