Skip to content

Commit 0f6245a

Browse files
committed
Handle exceptions inside ChangeLanguageAsync to avoid unobserved task crashes
1 parent 86581e6 commit 0f6245a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Flow.Launcher.Core/Resource/Internationalization.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,10 @@ private async Task ChangeLanguageAsync(Language language, bool updateMetadata =
206206
await Task.Run(UpdatePluginMetadataTranslations);
207207
}
208208
}
209+
catch (Exception e)
210+
{
211+
API.LogException(ClassName, $"Failed to change language to <{language.LanguageCode}>", e);
212+
}
209213
finally
210214
{
211215
_langChangeLock.Release();

0 commit comments

Comments
 (0)