chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Explicit error in home-made repl ?


From: felix winkelmann
Subject: Re: [Chicken-users] Explicit error in home-made repl ?
Date: Fri, 9 Feb 2007 10:33:32 +0100

On 2/8/07, Fred <address@hidden> wrote:
Hello to all,

I'am defining my own language on top of chicken and thus defining my own repl. A
condition-case allow to catch the scheme-level erros and thus to stay in my
repl. But my question is : how to print detailled scheme-level errors (given by
csi) in the condition-case. The only thing i am able to do is to print the
problematic input. The code of my repl is given at the end.

thanks for your help,
Fred

ps : the code :

(define (to-pise)
(print "Welcome to pise")
(print "")
(let loop ()
  (let ((input (read-until-newline)))
    (if (not (equal? input "bye\n"))
          (if (equal? input "")
              (loop)
              (begin
                (condition-case
                 (eval-print input)
                 (ex (exn) (begin
                             (print "error in : " input)
                             (newline)))
                 (ex () (print "another error")))
                (loop)))))))





Check out

http://callcc.org/print-error-message

and

http://callcc.org/print-call-chain


cheers,
felix




reply via email to

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