Ready for alpha 0.4.0 (the final alpha version (hopefully)) #72

Merged
That-One-Nerd merged 16 commits from shell-configuration into main 2023-04-25 17:42:32 -04:00
3 changed files with 9 additions and 6 deletions
Showing only changes of commit 6f65417fe7 - Show all commits

View File

@ -1,6 +1,6 @@
namespace SrcMod.Shell;
internal static class LoadingBar
public static class LoadingBar
{
public static int position = -1;
public static int bufferSize = 0;

View File

@ -239,24 +239,27 @@ public class Shell
void runCommand(object? sender, DoWorkEventArgs e)
{
#if RELEASE
try
{
#endif
command.Invoke(args);
#if RELEASE
}
#if RELEASE
catch (TargetInvocationException ex)
{
Write($"[ERROR] {ex.InnerException!.Message}", ConsoleColor.Red);
if (LoadingBar.Enabled) LoadingBar.End();
}
#endif
catch (Exception ex)
{
#if RELEASE
Write($"[ERROR] {ex.Message}", ConsoleColor.Red);
if (LoadingBar.Enabled) LoadingBar.End();
}
#else
Write($"[ERROR] {ex}", ConsoleColor.Red);
if (LoadingBar.Enabled) LoadingBar.End();
#endif
}
}
activeCommand = new();

View File

@ -1,6 +1,6 @@
namespace SrcMod.Shell;
internal static class Tools
public static class Tools
{
public static JsonSerializer Serializer { get; private set; }