Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to not swallow exceptions #85

Open
johnchandlerwatson opened this issue Jan 4, 2024 · 0 comments
Open

Add ability to not swallow exceptions #85

johnchandlerwatson opened this issue Jan 4, 2024 · 0 comments

Comments

@johnchandlerwatson
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant