Debug mode gives better errors now (tiny patch)
This commit is contained in:
parent
d8df50a928
commit
2dc37cd6ac
@ -237,24 +237,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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user