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

Default exception handler should exit on exception if exitCode was set #583

Closed
remkop opened this issue Jan 1, 2019 · 0 comments
Closed
Milestone

Comments

@remkop
Copy link
Owner

remkop commented Jan 1, 2019

When a runtime exception occurs while executing one of the convenience methods (CommandLine.run, CommandLine.call, CommandLine.parseWithHandlers, ...) the exception is wrapped in a ExecutionException and passed to the exception handler.

Currently, the default exception handler will rethrow this ExecutionException unconditionally.

However, when an exit code is set on the exception handler, the expectation is that picocli calls System.exit with that error code when an exception is encountered.

@remkop remkop added this to the 3.9 milestone Jan 1, 2019
@remkop remkop closed this as completed in f123b16 Jan 1, 2019
remkop added a commit that referenced this issue Jan 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant