24 Avr
2009
24 Avr
'09
10:49
Hello good people, I found that sometime gsi (or gsc) does not report the error location refering information. It make hard job to find location of error. After few tests I found simple code which display this issue.
(eval '(define (foo) (display (/ 1 0)))) (foo) *** ERROR IN foo -- Divide by zero, (/ 1 0)
Not (eval) makes the problem, because this variant works
(eval '(define (foo) (/ 1 0))) (foo) *** ERROR IN "test2.scm"@1.33 -- Divide by zero (/ 1 0)
And not (display):
(define (foo) (display (/ 1 0))) (foo) *** ERROR IN foo, "test2.scm"@1.25 -- Divide by zero (/ 1 0)
Could anybody explain this? N.B. I know that with scheme sometime hard to see where code was located before eval. The code may be generated by macros.