On Thu, Aug 17, 2017 at 2:44 AM, Sam Waxman <samwax...@gmail.com> wrote:

> Hey all,
>
> One of the things that confuses me most in Racket is good error handling,
> and the continuations that are involved.
>
> Is it possible to raise an error, have the user see it, but then still go
> on running the code? I can currently catch an error, display it as a
> string/other formats and then keep running my code, but is it possible to
> have the error be raised and then the continuation it goes to afterwards
> continue evaluating the code?
>
> Thanks
>

The exception object is:
(struct exn
<https://docs.racket-lang.org/reference/exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn%29%29>
 (message continuation-marks)
#:extra-constructor-name make-exn
<https://docs.racket-lang.org/reference/exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn%29%29>
    #:transparent)

I think the 'continuation-marks' field contains the continuations from
where you were when the exception was thrown, so you should be able to jump
back there.  Does that help?



> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to