-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
silent errors in Tasks #10405
Comments
Duplicate of #7626. This is not too different from other debugging scenarios, where for example results of intermediate computations are not printed by default. I don't really see how it could work to propagate exceptions from all tasks by default. That would mean blocking calls in the main task could be constantly interrupted by other task failures. For example a |
Perhaps errors in background tasks should still be printed to STDERR? |
Maybe we should do that in |
Wouldn't the "don't print" switch be to actually wait for the error and ignore it? |
I've typically felt that the don't print switch should be the absence of a print statement, but this sounds worth trying. I can see the argument that you want to be encouraged to explicitly handle task failures, either by wrapping certain tasks in try/catch, or by waiting for them elsewhere. |
This is a little different than a don't print switch since these are errors, which one does want to default to showing. So yeah, let's try it. |
ahah, i didn't know one could capture the exception with nevertheless, i guess i feel that if anything throws an error, be it the main thread or a task, and that error is not explicitly caught, then it should be printed to STDERR with a backtrace, the whole program should come to a grinding halt, and an error state should be returned. does that not make sense? |
Printing the error yes, but many people would probably want it logged and for the program to keep running if possible. Anyway that's more of a detail. I'm surprised to see the help for |
Silent failures are just a drain on debugging productivity. My vote is to print any uncaught errors to STDERR. Should be done whether interactive or not. Spurious uncaught errors in IJulia, the REPL, or multi.jl should be fixed over time. |
@vtjnash pointed out to me that there is kind of a timing bug here. For example
If |
One option could be to print the error only when the task object is gc'ed . |
the fact that
Exceptions
occurring inTasks
are not propagated back to the main thread makes debugging difficult.at the REPL:
on the unix command line:
The text was updated successfully, but these errors were encountered: