From 96c21b1acc2140fb58b5ba214f42b709b2893e74 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 12 Feb 2017 19:11:00 -0500 Subject: avoid special case in error printing (#237) --- src/StardewModdingAPI.Installer/InteractiveInstaller.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src') 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); } - /// Print an error and pause the console if needed. - /// The error text. - private void ExitError(string error) + /// Print a warning message. + /// The text to print. + private void PrintError(string text) { - this.PrintColor(error, ConsoleColor.Red); - Console.ReadLine(); + this.PrintColor(text, ConsoleColor.Red); } /// Print a message to the console. -- cgit