mirror of
https://github.com/ppy/osu.git
synced 2025-03-04 02:32:56 +08:00
Remove outdated ef related catch-when usage
This commit is contained in:
parent
910c0022e3
commit
26ef23c9a9
@ -11,7 +11,6 @@ using System.Linq.Expressions;
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using osu.Framework;
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Development;
|
using osu.Framework.Development;
|
||||||
using osu.Framework.Extensions;
|
using osu.Framework.Extensions;
|
||||||
@ -413,18 +412,7 @@ namespace osu.Game.Database
|
|||||||
/// Compact this realm.
|
/// Compact this realm.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public bool Compact()
|
public bool Compact() => Realm.Compact(getConfiguration());
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
return Realm.Compact(getConfiguration());
|
|
||||||
}
|
|
||||||
// Catch can be removed along with entity framework. Is specifically to allow a failure message to arrive to the user (see similar catches in EFToRealmMigrator).
|
|
||||||
catch (AggregateException ae) when (RuntimeInfo.OS == RuntimeInfo.Platform.macOS && ae.Flatten().InnerException is TypeInitializationException)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Run work on realm with a return value.
|
/// Run work on realm with a return value.
|
||||||
@ -720,11 +708,6 @@ namespace osu.Game.Database
|
|||||||
|
|
||||||
return Realm.GetInstance(getConfiguration());
|
return Realm.GetInstance(getConfiguration());
|
||||||
}
|
}
|
||||||
// Catch can be removed along with entity framework. Is specifically to allow a failure message to arrive to the user (see similar catches in EFToRealmMigrator).
|
|
||||||
catch (AggregateException ae) when (RuntimeInfo.OS == RuntimeInfo.Platform.macOS && ae.Flatten().InnerException is TypeInitializationException)
|
|
||||||
{
|
|
||||||
return Realm.GetInstance();
|
|
||||||
}
|
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if (tookSemaphoreLock)
|
if (tookSemaphoreLock)
|
||||||
|
Loading…
Reference in New Issue
Block a user