Re: commit: fv_View.cpp, pt_PT_ChangeSpan.cpp


Subject: Re: commit: fv_View.cpp, pt_PT_ChangeSpan.cpp
From: Tomas Frydrych (tomas@frydrych.uklinux.net)
Date: Sun Feb 25 2001 - 16:33:21 CST


> > pt_PT_ChangeSpan.cpp: added a helpful debug message before an
> > unhelpful assert.
>
> If an assert is unhelpful, it's a bad assert. If it's in a so complicated
> context that you can't easily understand the reason for it, add comments. An
> assert that no one understands is even *less* helpful than a SEGV. All IMHO
> of course.

I shoudn't have been so laconic; the assert in itself is good, but it
sits in a default case of a switch, and when it happens there is no
indication of what the offending switch value was (and becasue the
switch is done on a function call, not a variable, it is not obvious
even in a debugger). I have simply added a debug msg printing the
offending value before the assert.

Tomas



This archive was generated by hypermail 2b25 : Sun Feb 25 2001 - 16:39:55 CST