diff --git a/osu.Game/OsuGameBase.cs b/osu.Game/OsuGameBase.cs
index 8bda8fb6c2..fb7a238c46 100644
--- a/osu.Game/OsuGameBase.cs
+++ b/osu.Game/OsuGameBase.cs
@@ -678,18 +678,21 @@ namespace osu.Game
///
/// Allows a maximum of one unhandled exception, per second of execution.
///
+ /// Whether to ignore the exception and continue running.
private bool onExceptionThrown(Exception ex)
{
- bool continueExecution = Interlocked.Decrement(ref allowableExceptions) >= 0;
-
- Logger.Log($"Unhandled exception has been {(continueExecution ? $"allowed with {allowableExceptions} more allowable exceptions" : "denied")} .");
-
- RulesetStore.TryDisableCustomRulesetsCausing(ex);
+ if (Interlocked.Decrement(ref allowableExceptions) < 0)
+ {
+ Logger.Log("Too many unhandled exceptions, crashing out.");
+ RulesetStore.TryDisableCustomRulesetsCausing(ex);
+ return false;
+ }
+ Logger.Log($"Unhandled exception has been allowed with {allowableExceptions} more allowable exceptions.");
// restore the stock of allowable exceptions after a short delay.
Task.Delay(1000).ContinueWith(_ => Interlocked.Increment(ref allowableExceptions));
- return continueExecution;
+ return true;
}
protected override void Dispose(bool isDisposing)