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
Showing only changes of commit 2dc37cd6ac - Show all commits

View File

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