Re: [racket] with-handlers and exception structure

2012-09-03 Thread Gregory Woodhouse
Thanks! That looks very useful. In fact, it could have saved me fair amount of debugging time on my Sudoku program (now playable, but pretty bare bones). Sent from my iPhone On Sep 3, 2012, at 2:44 PM, Greg Hendershott wrote: > To add to what Matthew and Danny said, in addition to using > `ex

Re: [racket] with-handlers and exception structure

2012-09-03 Thread Greg Hendershott
To add to what Matthew and Danny said, in addition to using `exn-message' you can show a "stack trace" if you wish. For example: (define (exn->string exn) (string-append "Exception: " (exn-message exn))) (define (exn+stack->string exn) (string-append (exn->string exn) "\n" "S

Re: [racket] with-handlers and exception structure

2012-09-03 Thread Danny Yoo
On Monday, September 3, 2012, Gregory Woodhouse wrote: > Dumb question: If an exception is handled by (lambda (e) ... ) is it > possible to recover exception details such as any message that may have > been used in a raise or related statement? > Hi Gregory, The value raised by exceptions should

Re: [racket] with-handlers and exception structure

2012-09-03 Thread Matthew Flatt
At Mon, 03 Sep 2012 01:38:29 -0700, Gregory Woodhouse wrote: > Dumb question: If an exception is handled by (lambda (e) ... ) is it possible > to recover exception details such as any message that may have been used in a > raise or related statement? The `e' is normally an `exn' structure, so yo

[racket] with-handlers and exception structure

2012-09-03 Thread Gregory Woodhouse
Dumb question: If an exception is handled by (lambda (e) ... ) is it possible to recover exception details such as any message that may have been used in a raise or related statement? Racket Users list: http://lists.racket-lang.org/users