Merged with the small debug update.
This commit is contained in:
commit
6f65417fe7
@ -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;
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
namespace SrcMod.Shell;
|
||||
|
||||
internal static class Tools
|
||||
public static class Tools
|
||||
{
|
||||
public static JsonSerializer Serializer { get; private set; }
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user