-
-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't catch some errors thrown from worker threads. #64
Comments
heegaiximephoomeeghahyaiseekh
changed the title
Can't catch all errors.
Can't catch some errors thrown from worker threads.
Feb 16, 2017
It turns out that you don't have to be using |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
One common error that happens is when a client opens a connection but
never sends a request. Eventually, that produces a timeout error, which bubbles
up to the debugger. But that's hard to reproduce. Here's an easier one, generated
by simply sending invalid output:
The FAST-HTTP.ERROR:CB-MESSAGE-COMPLETE this throws isn't catchable anywhere because the error happens in a worker thread. It has nowhere to go but the debugger. This is pretty convenient for development, but a deal-killer for production code.
The
woo:run
function could accept an error-handling function that the worker thread would installwith HANDLER-BIND, like this:
Then, the app's error handler could invoke the
abort-worker-thread
restart toabort the worker thread, or
restart-worker
to start the worker up again.The text was updated successfully, but these errors were encountered: