mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-07 02:20:38 +00:00
Extend try/catch in media downloading to OperationCanceledException
Closes #372
This commit is contained in:
@@ -84,7 +84,10 @@ namespace DiscordChatExporter.Domain.Exporting
|
||||
|
||||
return relativeFilePath;
|
||||
}
|
||||
catch (HttpRequestException)
|
||||
// Try to catch only exceptions related to failed HTTP requests
|
||||
// https://github.com/Tyrrrz/DiscordChatExporter/issues/332
|
||||
// https://github.com/Tyrrrz/DiscordChatExporter/issues/372
|
||||
catch (Exception ex) when (ex is HttpRequestException || ex is OperationCanceledException)
|
||||
{
|
||||
// We don't want this to crash the exporting process in case of failure
|
||||
return url;
|
||||
|
||||
Reference in New Issue
Block a user