Skip to content
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

Remove catching (too generic) Throwable exceptions #446

Merged

Conversation

nielsvanvelzen
Copy link
Member

@nielsvanvelzen nielsvanvelzen commented Jul 29, 2022

This fixes the TooGenericExceptionCaught linter issue. We ignored it, but it actually ended up causing issues. When a coroutine is cancelled it often throws a CancellationException. This was caught and converted to an ApiClientException causing coroutine cancellation to stop working. This change removes the places that catch Throwable, and they may throw exceptions now. We'll need to watch this and possibly add new catch branches later.

Fixes jellyfin/jellyfin-androidtv#1909
Fixes jellyfin/jellyfin-androidtv#1889

This fixes the TooGenericExceptionCaught linter issue. We ignored it, but it actually ended up causing issues. When a coroutine is cancelled it often throws a CancellationException. This was caught and converted to an ApiClientException causing coroutine cancellation to stop working. This change removes the places that catch Throwable, and they may throw exceptions now. We'll need to watch this and possibly add new catch branches later.
@nielsvanvelzen nielsvanvelzen changed the title Remove catching Throwable exceptions Remove catching (too generic) Throwable exceptions Jul 29, 2022
@nielsvanvelzen nielsvanvelzen merged commit 1c674ab into jellyfin:master Jul 29, 2022
@nielsvanvelzen nielsvanvelzen deleted the too-generic-exception branch July 29, 2022 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jellyfin crashes when it jumps to the next episode AndroidTV client crashes immediately upon login
2 participants