Catch against sqlite initialisation failures

This commit is contained in:
Dean Herbert 2022-09-16 01:02:38 +09:00
parent a3d9a4d723
commit 5ce67345ae
1 changed files with 10 additions and 3 deletions

View File

@ -41,10 +41,17 @@ public class BeatmapUpdaterMetadataLookup : IDisposable
private const string cache_database_name = "online.db"; private const string cache_database_name = "online.db";
public BeatmapUpdaterMetadataLookup(IAPIProvider api, Storage storage) public BeatmapUpdaterMetadataLookup(IAPIProvider api, Storage storage)
{
try
{ {
// required to initialise native SQLite libraries on some platforms. // required to initialise native SQLite libraries on some platforms.
Batteries_V2.Init(); Batteries_V2.Init();
raw.sqlite3_config(2 /*SQLITE_CONFIG_MULTITHREAD*/); raw.sqlite3_config(2 /*SQLITE_CONFIG_MULTITHREAD*/);
}
catch
{
// may fail if platform not supported.
}
this.api = api; this.api = api;
this.storage = storage; this.storage = storage;