JasperFx/oakton

Add ability to not swallow exceptions

johnchandlerwatson opened this issue · 0 comments

When using Oakton my team would like to handle exceptions for all commands in Program.cs. Right now exceptions are swallowed here:

catch (Exception ex)
{    
     AnsiConsole.Write("[red]ERROR:[/]");
     AnsiConsole.WriteException(ex);
     return 1;
}

Command Executor line 54

in Program one might assume/desire for this to throw an exception:

await executor.ExecuteAsync(args);

maybe opt-in setting on CommandFactory when configuring your CommandExecutor?