better error message when a game fails

svn: r16444
This commit is contained in:
Robby Findler 2009-10-28 16:03:44 +00:00
parent 834d6f88c3
commit 3c1fa0e0e1

View File

@ -39,7 +39,12 @@
(with-handlers ([exn? (lambda (e)
(message-box (format "Error in \"~a\""
(game-name game))
(exn-message e) f '(ok)))])
(let ([ep (open-output-string)])
(parameterize ([current-error-port ep])
((error-display-handler) (exn-message e) e))
(get-output-string ep))
f
'(ok)))])
(run))))))
(define games