diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-02-12 19:11:00 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-02-12 19:11:00 -0500 |
commit | 96c21b1acc2140fb58b5ba214f42b709b2893e74 (patch) | |
tree | 005339f9d458b5766691d1ec742342df6eafb9cf /src | |
parent | 95786e9e44ed2ddfc0d38e8279b8c0166db7fc85 (diff) | |
download | SMAPI-96c21b1acc2140fb58b5ba214f42b709b2893e74.tar.gz SMAPI-96c21b1acc2140fb58b5ba214f42b709b2893e74.tar.bz2 SMAPI-96c21b1acc2140fb58b5ba214f42b709b2893e74.zip |
avoid special case in error printing (#237)
Diffstat (limited to 'src')
-rw-r--r-- | src/StardewModdingAPI.Installer/InteractiveInstaller.cs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/StardewModdingAPI.Installer/InteractiveInstaller.cs b/src/StardewModdingAPI.Installer/InteractiveInstaller.cs index 36301829..c751cef9 100644 --- a/src/StardewModdingAPI.Installer/InteractiveInstaller.cs +++ b/src/StardewModdingAPI.Installer/InteractiveInstaller.cs @@ -137,12 +137,14 @@ namespace StardewModdingApi.Installer ****/ if (!packageDir.Exists) { - this.ExitError($"The 'internal/{platform}' package folder is missing (should be at {packageDir})."); + this.PrintError($"The 'internal/{platform}' package folder is missing (should be at {packageDir})."); + Console.ReadLine(); return; } if (!File.Exists(paths.executable)) { - this.ExitError("The detected game install path doesn't contain a Stardew Valley executable."); + this.PrintError("The detected game install path doesn't contain a Stardew Valley executable."); + Console.ReadLine(); return; } Console.WriteLine(); @@ -333,12 +335,11 @@ namespace StardewModdingApi.Installer this.PrintColor(text, ConsoleColor.DarkYellow); } - /// <summary>Print an error and pause the console if needed.</summary> - /// <param name="error">The error text.</param> - private void ExitError(string error) + /// <summary>Print a warning message.</summary> + /// <param name="text">The text to print.</param> + private void PrintError(string text) { - this.PrintColor(error, ConsoleColor.Red); - Console.ReadLine(); + this.PrintColor(text, ConsoleColor.Red); } /// <summary>Print a message to the console.</summary> |