Skip to content

Commit 6cb0d12

Browse files
committed
Catch all exceptions instead
1 parent 94749eb commit 6cb0d12

3 files changed

Lines changed: 3 additions & 6 deletions

File tree

Celeste.Mod.mm/Mod/UI/AutoModUpdater.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
using System.Net;
1010
using System.Threading;
1111
using System.Threading.Tasks;
12-
using System.Security.Authentication;
1312

1413
namespace Celeste.Mod.UI {
1514
public class AutoModUpdater : Scene {
@@ -143,7 +142,7 @@ private void autoUpdate(SortedDictionary<ModUpdateInfo, EverestModuleMetadata> u
143142
ModUpdaterHelper.VerifyChecksum(update, zipPath);
144143

145144
break; // out of the loop
146-
} catch (Exception e) when (e is WebException or TimeoutException or IOException or AuthenticationException) {
145+
} catch (Exception e) {
147146
downloadException = e;
148147
Logger.Warn("AutoModUpdater", $"Download from {url} failed, trying another mirror");
149148
Logger.LogDetailed(e);

Celeste.Mod.mm/Mod/UI/OuiDependencyDownloader.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
using System.Net;
88
using System.Threading;
99
using System.Threading.Tasks;
10-
using System.Security.Authentication;
1110

1211
namespace Celeste.Mod.UI {
1312
class OuiDependencyDownloader : OuiLoggedProgress {
@@ -475,7 +474,7 @@ private void downloadDependency(ModUpdateInfo mod, EverestModuleMetadata install
475474
LogLine(Dialog.Clean("DEPENDENCYDOWNLOADER_VERIFYING_CHECKSUM"));
476475
ModUpdaterHelper.VerifyChecksum(mod, downloadDestination);
477476
break; // out of the loop
478-
} catch (Exception e) when (e is WebException or TimeoutException or IOException or AuthenticationException) {
477+
} catch (Exception e) {
479478
downloadException = e;
480479
Logger.Warn("OuiDependencyDownloader", $"Download failed, trying another mirror");
481480
Logger.LogDetailed(e);

Celeste.Mod.mm/Mod/UI/OuiModUpdateList.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
using System.IO;
88
using System.Net;
99
using System.Threading.Tasks;
10-
using System.Security.Authentication;
1110

1211
namespace Celeste.Mod.UI {
1312
class OuiModUpdateList : Oui, OuiModOptions.ISubmenu {
@@ -361,7 +360,7 @@ private void downloadMod(ModUpdateInfo update, TextMenu.Button button, string zi
361360

362361
ModUpdaterHelper.VerifyChecksum(update, zipPath);
363362
break; // out of the loop
364-
} catch (Exception e) when (e is WebException or TimeoutException or IOException or AuthenticationException) {
363+
} catch (Exception e) {
365364
downloadException = e;
366365
Logger.Warn("OuiModUpdateList", $"Download from {url} failed, trying another mirror.");
367366
Logger.LogDetailed(e);

0 commit comments

Comments
 (0)