1
0
Fork 0
mirror of https://github.com/ppy/osu-tools.git synced 2025-06-09 09:35:15 +09:00

Stop calculating on rate limiting

This commit is contained in:
StanR 2022-07-21 04:53:52 +03:00
parent 37f102c4e5
commit b8bfd4eb84

View file

@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
using osu.Framework.Allocation;
@ -250,10 +251,14 @@ namespace PerformanceCalculatorGUI.Screens
}
catch (Exception e)
{
if (e is WebException)
{
// web exception usually means we hit rate limiting in which case we wanna bail immediately
throw;
}
Logger.Log(e.ToString(), level: LogLevel.Error);
notificationDisplay.Display(new Notification(e.Message));
// should probably stop calculating??
}
});
}