1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-27 17:03:21 +08:00

Use Logger.Error when exceptions are involved

This commit is contained in:
Dean Herbert 2017-12-25 18:21:15 +09:00
parent 320a6b0480
commit 6f5f4f76e5
3 changed files with 3 additions and 4 deletions

View File

@ -177,8 +177,7 @@ namespace osu.Game
}
catch (MigrationFailedException e)
{
Logger.Log((e.InnerException ?? e).ToString(), LoggingTarget.Database, LogLevel.Error);
Logger.Log("Migration failed! We'll be starting with a fresh database.", LoggingTarget.Database, LogLevel.Error);
Logger.Error(e.InnerException ?? e, "Migration failed! We'll be starting with a fresh database.", LoggingTarget.Database);
// if we failed, let's delete the database and start fresh.
// todo: we probably want a better (non-destructive) migrations/recovery process at a later point than this.

View File

@ -42,7 +42,7 @@ namespace osu.Game.Rulesets.Edit
}
catch (Exception e)
{
Logger.Log($"Could not load this beatmap sucessfully ({e})!", LoggingTarget.Runtime, LogLevel.Error);
Logger.Error(e, "Could not load beatmap sucessfully!");
return;
}

View File

@ -125,7 +125,7 @@ namespace osu.Game.Screens.Play
}
catch (Exception e)
{
Logger.Log($"Could not load this beatmap sucessfully ({e})!", LoggingTarget.Runtime, LogLevel.Error);
Logger.Error(e, "Could not load beatmap sucessfully!");
//couldn't load, hard abort!
Exit();