Skip to content

Commit

Permalink
Fix: Catch SQLiteException when adding temp beatmaps
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotrekol committed Jan 30, 2021
1 parent fec45ee commit a8bd4d9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion osu!StreamCompanion/Code/Core/SqliteConnector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,15 @@ public void StoreTempBeatmap(IBeatmap beatmap)
string.Format("INSERT OR REPLACE INTO Temp ({0}) VALUES ({1})", _tableStruct.GetFieldnames(), _tableStruct.GetFieldnames("@"));
_insertSql = new SQLiteCommand(sql, _mDbConnection);
FillBeatmapParameters(beatmap);
_insertSql.ExecuteNonQuery();
try
{
_insertSql.ExecuteNonQuery();
}
catch (SQLiteException exception)
{
exception.Data.Add("maphash", beatmap?.Md5 ?? "null");
_logger?.Log(exception, LogLevel.Error);
}
}

private void FillBeatmapParameters(IBeatmap beatmap)
Expand Down

0 comments on commit a8bd4d9

Please sign in to comment.