summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Program.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/StardewModdingAPI/Program.cs')
-rw-r--r--src/StardewModdingAPI/Program.cs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs
index 74a9ff8e..37e1e000 100644
--- a/src/StardewModdingAPI/Program.cs
+++ b/src/StardewModdingAPI/Program.cs
@@ -337,15 +337,11 @@ namespace StardewModdingAPI
string psDir = Path.Combine(mod.DirectoryPath, "psconfigs");
Directory.CreateDirectory(psDir);
if (!Directory.Exists(psDir))
- {
- mod.Status = ModMetadataStatus.Failed;
- mod.Error = "it requires per-save configuration files ('psconfigs') which couldn't be created for some reason.";
- }
+ mod.SetStatus(ModMetadataStatus.Failed, "it requires per-save configuration files ('psconfigs') which couldn't be created for some reason.");
}
catch (Exception ex)
{
- mod.Status = ModMetadataStatus.Failed;
- mod.Error = $"it requires per-save configuration files ('psconfigs') which couldn't be created: {ex.GetLogSummary()}";
+ mod.SetStatus(ModMetadataStatus.Failed, $"it requires per-save configuration files ('psconfigs') which couldn't be created: {ex.GetLogSummary()}");
}
}
}