summaryrefslogtreecommitdiff
path: root/test/error_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Support for required optionsWilliam Woodruff2017-09-291-0/+14
| | | | | | | | | | | This commit introduces support for required options, which are options that cause the parser to raise a `MissingRequiredOption` exception if not present. Options can be marked as required by passing `required: true` in their configuration, and any errors caused by missing required options can be suppressed via `suppress_errors: true`.
* Fix bug preventing '--' being passed as the first argument.Thomas Bénéteau2017-08-051-0/+6
|
* Rewrite UnknownOption.getUnknownOption() to flagsigurdsvela2015-04-071-1/+1
| | | | | | Rewrite the UnknownOption.getUnknownOption() to use attr_reader :flags. And rename the initialize parameter unknownOption to flag.
* Rewrite MissingOption.getFlags() to flagssigurdsvela2015-04-071-1/+1
| | | | | | Removes the MissingOption.getFlags() function and replaces it with attr_reader :flags
* Implement getFlags in MissingArgumentsigurdsvela2015-04-061-0/+7
| | | | | | A function in MissingArgument that returns and array of all the flags that matches the option missing an argument
* Remove semi-colons to conform to the code stylesigurdsvela2015-04-061-1/+1
|
* Fix typo in commentsigurdsvela2015-04-061-1/+1
|
* Implement getUnknownMessage in UnknownOptionsigurdsvela2015-04-061-0/+7
| | | | | | | This allows to retrive the unknown option in question when catching the error. This can be useful to, for example, taylor a spesific output for common errors amongst users.
* Handle UnknownOption exceptionsLee Jarvis2014-11-191-0/+14
|
* Add MissingArgument error processing, and suppressingLee Jarvis2014-11-191-0/+17