[racket] raise-ing an exception inside prompt
Replace print with displayln. (You're buffering the output but it isn't displayed until the repl prints the next prompt.)
On Dec 22, 2010, at 11:56 AM, Keiko Nakata wrote:
> Hello,
>
> How should I understand this behavior?
>
> (with-handlers ([(lambda (_) #t) (lambda (_) (print "exit"))])
> (print (+ (prompt (print "hi") (raise 3) (print "bye")) 10)))
>
> prints "hi" then "exit", whereas
>
> (+ (prompt (print "hi") (raise 3) (print "bye")) 10)
>
> prints "hi", then I got an uncaught exception, followed by type error
> of adding <void> and 10.
>
> Btw, where can I find the source code around exceptions,
> e.g., raise and with-handlers?
>
> Thanks,
> Keiko
> _________________________________________________
> For list-related administrative tasks:
> http://lists.racket-lang.org/listinfo/users