[armedbear-devel] debug assert considered bad for health

Mark Evenson evenson at panix.com
Thu May 6 15:03:11 UTC 2010

On 5/6/10 3:44 PM, Alan Ruttenberg wrote:
> I committed a sin on this one and worked around it and didn't record the
> specifics :( I'll be better next time.
> But what I wanted to point out (not very constructively - sorry) was
> that it would be nice if debug.assertTrue printed out what it tried to
> assert as a message, to the console, so that one could diagnose a little
> without having to find the line in the source code.

Since Java doesn't have a standard macro facility or a concept like 
eval, I can't think of an wasy way to output the tested assertion 
without repeating the string twice (which tends to lead to errors in my 
experience).  There is often little context in the assertion code as to 
why the particular assertion needs to be true, so I'm not sure how 
helpful this would be.

If you got an idea how to make this more meaningful, I'm willing to 
implement something better.

"A screaming comes across the sky.  It has happened before, but there
is nothing to compare to it now."

More information about the armedbear-devel mailing list