Skip to content

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

@nfischer

Description

@nfischer

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions