[armedbear-devel] debug assert considered bad for health
Alan Ruttenberg
alanruttenberg at gmail.com
Thu May 6 15:53:00 UTC 2010
On Thu, May 6, 2010 at 11:03 AM, Mark Evenson <evenson at panix.com> wrote:
> 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.
>
My java buddy says use this facility:
http://java.sun.com/j2se/1.4.2/docs/guide/lang/assert.html
-Alan
>
>
> --
> "A screaming comes across the sky. It has happened before, but there
> is nothing to compare to it now."
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/armedbear-devel/attachments/20100506/0e8d98f8/attachment.html>
More information about the armedbear-devel
mailing list