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

Exception classes should be public #83

Closed
sergio-castro opened this issue Sep 19, 2015 · 3 comments
Closed

Exception classes should be public #83

sergio-castro opened this issue Sep 19, 2015 · 3 comments

Comments

@sergio-castro
Copy link

It would be nice if (some of) the exception classes become public.
I was trying to pretty print for my users the output when a required option is not present (MissingRequiredOptionsException) or when a required argument is not there (OptionMissingRequiredArgumentException). I wanted to simplify the implementation just by caching the previously mentioned exceptions but I cannot do it since those classes are not public. Is it possible to change this?

At the moment I have to inspect the resulting OptionSet to show pretty-printed errors (an option or its argument is not present). This is quite cumbersome.

Thanks.

@pholser
Copy link
Collaborator

pholser commented Jan 22, 2016

See also the discussion in #87.

@lbergelson
Copy link
Contributor

I know that I've also wanted to catch exceptions. We're using jopt-simple as part of our command line parser and putting other functionality on top of it. There have been times that I've wanted to be able to catch specific exceptions and react to them with something other than printing the message.

I understand that it may be a burden to expose them and then have to support them.

@pholser
Copy link
Collaborator

pholser commented Apr 16, 2023

I don't foresee ever implementing this. Closing.

@pholser pholser closed this as completed Apr 16, 2023
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

3 participants