-
Notifications
You must be signed in to change notification settings - Fork 13
Description
hi
I defined
#define PROGRAMOPTIONS_SILENT
and I expected to get exceptions instead of the error messages, but there were no exceptions even when I had non-option arguments. Also, I'm not sure this really needs to be a pre-processor definition. Could you not have a .verbose() member to enable std::cerr messages as well as .throw_on_error(bool) to enable/disable exceptions on error? I think by default it should throw an exception unless user sets throw_on_error(false);
I definitely think that a non-option argument should result in an exception, because the app user is clearly trying to do something, and if the app can't do it, it should not ignore it. That's confusing.
I would also like to get easier access to non-option arguments, other than just via a callback. Could you not simply add a function like:
std::vector<std::string> non_option_args(void);
That way I can easily do what I want with them without callbacks.
Thanks, peter