[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Re: Showing source:line in output of failed assertions?
From: |
Felix |
Subject: |
[Chicken-users] Re: Showing source:line in output of failed assertions? |
Date: |
Sat, 10 Jul 2010 00:08:23 +0200 (CEST) |
From: Alejandro Forero Cuervo <address@hidden>
Subject: Showing source:line in output of failed assertions?
Date: Fri, 9 Jul 2010 14:57:40 +0200
> 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.
>
Yes, makes sense.
cheers,
felix