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

Ability to handle both exit code and exception when running CLI applications #12532

Merged
merged 1 commit into from
Oct 8, 2020

Conversation

pedroigor
Copy link
Contributor

@pedroigor pedroigor commented Oct 5, 2020

Fixes #12397
A few points:

  • Basically, if an exit handler is provided we don't do any logging but leave to the custom exit handler to deal with both exit code and exception
  • I've removed logging from Application so that any logging can be done depending on whether or not an exit handler is provided.

I'm not sure if that is the best approach but it helps to allow CLI applications to better handle messages to their users without necessarily show Quarkus messages and stack traces.

Copy link
Member

@stuartwdouglas stuartwdouglas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor comments otherwise looks good.

@pedroigor pedroigor merged commit c82e304 into quarkusio:master Oct 8, 2020
@pedroigor pedroigor deleted the issue-12397 branch October 8, 2020 09:41
@gsmet gsmet added this to the 1.9.0.Final milestone Oct 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exception Handling/Mapping When Running Quarkus Command Mode Applications
3 participants