[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Debuglevels, assertions



Christian Reiniger writes:
 > Again on those debuglevels ('cause I still think it's a good thing)
 > (this is a rethought copy of my previous post concerning that topic)
 > 
 > My suggestion:


Yess I agree, we should have debuglevels and more importantly
assertions.  And I also agree, ppError or some equivilent should
always be evaluated.


 > 
 > 
 > Ok, now about that assertion stuff. We need some ppAssert macro similar to
 > the std C assert ().
Yes.

 > I *think* it should throw an exception (ppEAssertionFailed) instead of
 > exit()ing. That makes it possible to recover from the error (useful in some
 > cases) and the exception bloat doesn't really matter as it exists only in
 > the debug version. Comments?
Why is being able to recover from a failed Assert() usefull?

 > 
 > 
 > Apropos exceptions: The exception class has to be extended to include the
 > __LINE__ and __FILE__ infos. If we wrap the throwing in some ppThrow ()
 > macro then that's easy. Countervoices? No? Ok.
Maybe.  We are very worried about bloating the final product remember,
maybe if ppThrow only does this in debuggin, I don't know. Actually I
thought these went in the existing "location" field, but its probably
better that they do not.

 > 
 > Cu
 > 	Christian
 > --
 > 
 > Pentium says: E=mc^1.993822756
 > 
 > ---------------------------------------------------------------------
 > To unsubscribe, e-mail: penguinplay-unsubscribe@sunsite.auc.dk
 > For additional commands, e-mail: penguinplay-help@sunsite.auc.dk
 >