mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-27 21:24:12 -04:00
Extend try/catch in media downloading to OperationCanceledException
Closes #372
This commit is contained in:
parent
fa80c82468
commit
a25e809671
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue