Extend try/catch in media downloading to OperationCanceledException

Closes #372
pull/379/head
Alexey Golub 4 years ago
parent fa80c82468
commit a25e809671

@ -84,7 +84,10 @@ namespace DiscordChatExporter.Domain.Exporting
return relativeFilePath; 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 // We don't want this to crash the exporting process in case of failure
return url; return url;

Loading…
Cancel
Save