On 9/26/2019 5:45 AM, Marc Kaufmann wrote:
Thanks for clearing this up. If I understand correctly, the following happens:

- the servlet raises an exception
- this is caught by the default exception handler
- it prints the traceback and exception message to standard output which I see (and which made me realize an exception had been raised), and it passes the response to the servlet-tester. However, the exception didn't bubble up to check-not-exn

Since I can't turn off the exception handling of the servlets, I have to look at the output to find that an exception was thrown. Could I pass a different exception-handler to the test-servlet, which would return something easier (and more robust) to check whether an exception was thrown or not? Or should I bundle the servlet into a lambda for this, and have an exception-handler in that lambda that simply outputs "exception-raised" or some such? Otherwise I can of course parse the output, but that seems a little more error-prone.

I vector every URL through a common dispatch routine that catches exceptions from the handlers and sends proper errors back to the client.   Of course this means I (you) can't use the ready-made dispatch machinery provided by web-server.

I wrote my own dispatcher routine, but there may be a way to do it working with web-server.  I was under some time constraints when I did this so I didn't have the opportunity to delve into it too deeply.  And once it worked, inertia took over and I reused the code. <shrug>

YMMV,
George



--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/ad3777ea-0aa9-c28b-aac2-e0e0c62886e9%40comcast.net.

Reply via email to