chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Showing source:line in output of failed assertions?


From: Alejandro Forero Cuervo
Subject: [Chicken-users] Showing source:line in output of failed assertions?
Date: Fri, 9 Jul 2010 14:57:40 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

When an assertion (based on the “assert” macro) fails, Chicken
currently prints something like:

    Error: assertion failed: (some-expr)

            Call history:

            ##sys#error                     <--

Could the definition of the assert macro be modified to include in the
output the source file and line number containing the expression, when
known, to produce something like this instead?

    Error: svnwiki-foo.scm:812: assertion failed: (some-expr)

            Call history:

            ##sys#error                     <--

This would greatly simplify my work: I have many programs that assert
the same expression in multiple places, and looking at the call
history is not always helpful to know which is the one that failed).
This should be relatively straightforward given the “get-line-number”
macro.

Thanks!

Alejo.
http://azul.freaks-unidos.net/



reply via email to

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