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

parseOptions: allow a way to keep errors silent (exception only) #591

Closed
nfischer opened this issue Nov 30, 2016 · 0 comments
Closed

parseOptions: allow a way to keep errors silent (exception only) #591

nfischer opened this issue Nov 30, 2016 · 0 comments

Comments

@nfischer
Copy link
Member

Currently, parseOptions always outputs an error message to stderr if an unknown option is encountered. It would be great if there was an easy way to make sure parseOptions would remain silent, even when it throws an error.

My suggestion is to change the function signature to

function parseOptions(optString, optionsMapping, functionOptions)

The last argument could have a silent option which, if specified, should take precedence over config.silent inside common.error().

Blocks #590

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

2 participants