From: Dennis S. <sy...@yo...> - 2004-06-27 16:05:01
|
On Sun, 2004-06-27 at 12:42 -0300, Duilio Javier Protti wrote: > I think next step must be enforce all preconditions to > catch bugs: > > int visual_some_thing (VisSome *vis) > { > if (vis == NULL) > return -1; > } > > must be changed for: > > int visual_some_thing (VisSome *vis) > { > assert (vis != NULL); > ... > } I'm not sure about this, I do agree tho that we should do extensive error checking using visual_log, I think this should be sufficient and this way we don't have to change the code. Maybe it's best tho to just use return_if_null macro in which we can do an assert temporarly. > This way we can catch them early, before the bug > propagate to obscure places. This is on the devel > line and just for a while, to clean up things and > to detect where the problems are, before to > change the VisBin module or create the new param > module. > On the final release we will use a nice macro > _lv_return_if_null(), as you suggest on the TODO > list, that will show a critical warning but will > not abort. > > > Duilio. |