Potential Unhandled Exceptions in Perpetual Tasks
See original GitHub issueThe bot often makes use of the pattern of loop.create_task
with tasks that are meant to run perpetually. However, there are no provisions for restarting tasks should any exceptions occur in them.
Discord.py’s tasks extension looks promising and that could be used going forward. As an alternative, some wrapper could be created that just logs exceptions and tries again, or using Future.add_done_callback
. There are probably more possible approaches.
See discussion in #360 for details on a particular case.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Tasks and Unhandled Exceptions - .NET Parallel Programming
To address this, Tasks keep track of whether an unhandled exception has been “observed.” In this context, “observed” means that code has joined ......
Read more >How to handle all unhandled exceptions when using Task ...
I'm using the TPL (Task Parallel Library) in .NET 4.0. I want to centralize the handling logic of all unhandled exceptions by using...
Read more >Licensing error during backup - misleading Error Message
Hello, we're on B&R Update 11a and still facing the error-message "1Processing xxxxxxx Error: Unhandled exception was thrown during ...
Read more >PyCharm Debugging - Stop on Unhandled Exceptions
To ensure this is set up correctly, go to Run > View Breakpoints (Ctrl + Shift + F8). In the dialog box, ensure...
Read more >Any way to catch unhandled exceptions within tasks? - Reddit
Solution: The tasks' exceptions can be caught by using the TaskScheduler.UnobservedTaskException, however the "gotcha" is that this will ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’d suggest you hold off for now. Scheduling is one of the first things being ported to bot-core, and I expect a PR within the next couple days.
Maybe it’ll be released by the time we’re done moving over to Django.