Skip to content

Commit

Permalink
Actually log the error when saving/loading files.
Browse files Browse the repository at this point in the history
  • Loading branch information
MidoriKami committed Jul 26, 2024
1 parent 53377e9 commit 3158001
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Configuration/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public static void SaveConfigFile<T>(this IDalamudPluginInterface pluginInterfac
catch (Exception e) {
// If there is any kind of error loading the file, generate a new one instead and save it.
var localLog = pluginInterface.Create<LogWrapper>();
localLog?.Log.Error($"Error trying to load file {filePath}, creating a new one instead.", e);
localLog?.Log.Error(e, $"Error trying to load file {filePath}, creating a new one instead.");

SaveFile(pluginInterface, filePath, createFunc());
}
Expand All @@ -95,7 +95,7 @@ private static void SaveFile<T>(IDalamudPluginInterface pluginInterface, string
}
catch (Exception e) {
var localLog = pluginInterface.Create<LogWrapper>();
localLog?.Log.Error($"Error trying to save file {filePath}", e);
localLog?.Log.Error(e, $"Error trying to save file {filePath}");
}
}

Expand Down

0 comments on commit 3158001

Please sign in to comment.