chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Error info


From: felix winkelmann
Subject: Re: [Chicken-users] Error info
Date: Tue, 4 Jan 2005 17:53:06 +0100

On Mon, 3 Jan 2005 21:40:52 +0000, Joel Reymont <address@hidden> wrote:
> Would it be possible to supply more context information in this case?
> 
> Error: bad argument count - received 2 but expected 3
> 
> I think it would be very helpful to know which proc is Chicken
> complaining about. Would the debug egg help here?
> 

The debug extension will show quite some info, but works only
under the interpreter (csi). For compiled code you should get a
backtrace, though (not too useful, but better than nothing):

; loading /home/felix/.csirc ...
; loading /usr/local/lib/chicken/miscmacros.scm ...
; loading /usr/local/lib/chicken/debug.so ...
; loading library srfi-1 ...
; loading library utils ...
; loading library posix ...
...
#;2> (define (fac n)  (if (zero? n) (fac 1 2 3)  (* n (fac (sub1 n))) ) )
#;3> (fac 10)
[debug] Runtime error_________________________________

(exn arity)

Error: bad argument count - received 3 but expected 1

Backtrace:

0: (fac 1 2 3)
1: (fac 0)
2: (fac 1)
3: (fac 2)
4: (fac 3)
5: (fac 4)
...
______________________________________________________
#;3> 


cheers,
felix




reply via email to

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