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:
parent
37f102c4e5
commit
b8bfd4eb84
1 changed files with 7 additions and 2 deletions
|
@ -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??
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue