mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-04-26 07:52:20 +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;
|
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;
|
||||||
|
|||||||
Reference in New Issue
Block a user