Skip to content

Commit

Permalink
Rename property and improve xmldoc
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed May 10, 2022
1 parent cac6d55 commit 4d22f26
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion osu.Game.Tournament/TournamentGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class TournamentGame : TournamentGameBase
private Bindable<WindowMode> windowMode;
private LoadingSpinner loadingSpinner;

protected override int SoftHandledExceptions => DebugUtils.IsDebugBuild ? 0 : 1;
protected override int ExceptionsBeforeCrash => DebugUtils.IsDebugBuild ? 0 : 1;

[BackgroundDependencyLoader]
private void load(FrameworkConfigManager frameworkConfig, GameHost host)
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/OsuGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public class OsuGame : OsuGameBase, IKeyBindingHandler<GlobalAction>, ILocalUser

private readonly List<OverlayContainer> visibleBlockingOverlays = new List<OverlayContainer>();

protected override int SoftHandledExceptions => DebugUtils.IsDebugBuild ? 0 : 1;
protected override int ExceptionsBeforeCrash => DebugUtils.IsDebugBuild ? 0 : 1;

public OsuGame(string[] args = null)
{
Expand Down
11 changes: 8 additions & 3 deletions osu.Game/OsuGameBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,20 @@ public virtual string Version
protected DatabaseContextFactory EFContextFactory { get; private set; }

/// <summary>
/// Number of exceptions to allow before aborting execution.
/// Number of unhandled exceptions to allow before aborting execution.
/// </summary>
protected virtual int SoftHandledExceptions => 0;
/// <remarks>
/// When an unhandled exception is encountered, an internal count will be decremented.
/// If the count hits zero, the game will crash.
/// Each second, the count is incremented until reaching the value specified.
/// </remarks>
protected virtual int ExceptionsBeforeCrash => 0;

public OsuGameBase()
{
Name = @"osu!";

allowableExceptions = SoftHandledExceptions;
allowableExceptions = ExceptionsBeforeCrash;
}

[BackgroundDependencyLoader]
Expand Down

0 comments on commit 4d22f26

Please sign in to comment.