chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] Allow assert to accept an arbitrary expres


From: Felix
Subject: Re: [Chicken-hackers] [PATCH] Allow assert to accept an arbitrary expression as the message
Date: Sat, 10 Mar 2012 12:54:11 +0100 (CET)

From: Alaric Snell-Pym <address@hidden>
Subject: [Chicken-hackers] [PATCH] Allow assert to accept an arbitrary 
expression as the message
Date: Thu, 08 Mar 2012 21:11:40 +0000

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 
> ...which is evaluated at assertion failure time!
> 
> I undid the check that the supplied MSG is a string at expansion time,
> and instead placed the string-append that combines it with the line
> number into the result of expansion. For safety, I added explicit
> (->string ...) around the message, due to the philosophy that it's good
> for debugging logging tools to not break due to an error in generating
> the error message, but instead to print whatever it can...

Unfortunately "->string" might not always be available in code that uses
the "assert" syntax. It would be nice if "assert" only depended on the
base library.


cheers,
felix



reply via email to

[Prev in Thread] Current Thread [Next in Thread]